Skip to content

Commit 45a2f7e

Browse files
author
Richard Feldman
committed
Add .travis.yml
1 parent d60d1ef commit 45a2f7e

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.travis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
sudo: false
2+
3+
cache:
4+
directories:
5+
- tests/elm-stuff/build-artifacts
6+
- sysconfcpus
7+
8+
before_install:
9+
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
10+
- | # epic build time improvement - see https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142
11+
if [ ! -d sysconfcpus/bin ];
12+
then
13+
git clone https://github.com/obmarg/libsysconfcpus.git;
14+
cd libsysconfcpus;
15+
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus;
16+
make && make install;
17+
cd ..;
18+
fi
19+
20+
21+
install:
22+
- nvm install $TARGET_NODE_VERSION
23+
- nvm use $TARGET_NODE_VERSION
24+
- node --version
25+
- npm --version
26+
- npm install -g elm@0.18.0 elm-test elm-format@exp
27+
- mv $(npm config get prefix)/bin/elm-make $(npm config get prefix)/bin/elm-make-old
28+
- 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
29+
- chmod +x $(npm config get prefix)/bin/elm-make
30+
- travis_retry elm-package install --yes
31+
- cd tests
32+
- npm install
33+
- travis_retry elm-package install --yes
34+
- cd ..
35+
36+
script:
37+
- elm-format --validate src tests
38+
- cd ..

0 commit comments

Comments
 (0)