Skip to content

Commit

Permalink
ci(travis): Improved build times
Browse files Browse the repository at this point in the history
  • Loading branch information
OzTK committed Sep 10, 2017
1 parent bcaf89f commit 8677f4e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 206 deletions.
32 changes: 26 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
language: node_js
node_js:
- '8'
env:
global:
- SNYK_TOKEN="698bcdaf-92de-4a07-bdb7-df4a3fc358b3"

cache:
- tests/fixtures/elm-stuff/build-artifacts
- sysconfcpus

before_install:
- | # epic build time improvement - see https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142
if [ ! -d sysconfcpus/bin ];
then
git clone https://github.com/obmarg/libsysconfcpus.git;
cd libsysconfcpus;
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus;
make && make install;
cd ..;
fi
install:
- npm i -g elm
- npm i -g elm@0.18
- npm install
- cd test/fixtures
- travis_retry travis_wait elm-make --yes
- travis_retry elm-package install
- |
mv $(npm config get prefix)/bin/elm-make $(npm config get prefix)/bin/elm-make-old
printf '%s\n\n' '#!/bin/bash' 'echo "Running elm-make with sysconfcpus -n 2"' '$TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 elm-make-old "$@"' > $(npm config get prefix)/bin/elm-make
chmod +x $(npm config get prefix)/bin/elm-make
- elm-make --yes
- cd ../..

script:
- npm run-script snyk
- npm run build
- travis_wait 40 npm test
- npm test

after_success:
- npm run coverage
198 changes: 0 additions & 198 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"build": "tsc -p .",
"postbuild": "copyfiles -f package.json src/Main.elm.hbs src/elm-package.json README.md CHANGELOG.md LICENSE lib/ && copyfiles -u 1 'src/elm-server-side-renderer/**/*' lib/",
"publish": "npm publish ./lib",
"snyk": "snyk test",
"snyk:t": "snyk test",
"snyk:m": "snyk monitor",
"test": "nyc mocha --compilers ts:ts-node/register --require source-map-support/register --bail test/*.ts",
"coverage:local": "nyc report --reporter=html",
"coverage": "nyc report --reporter=text-lcov | coveralls"
Expand Down Expand Up @@ -65,7 +66,6 @@
"@types/sinon": "^2.3.3",
"copyfiles": "^1.2.0",
"coveralls": "^2.13.1",
"elm": "^0.18.0",
"express": "^4.15.4",
"mocha": "^3.5.0",
"npm-run-all": "^4.1.1",
Expand Down

0 comments on commit 8677f4e

Please sign in to comment.