-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
42 lines (38 loc) · 1.39 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
sudo: false
cache:
directories:
# Cache build artifacts to avoid constantly rebuilding. See:
# https://8thlight.com/blog/rob-looby/2016/04/07/caching-elm-builds-on-travis-ci.html
- tests/elm-stuff/build-artifacts
# Install and cache sysconfcpus
- sysconfcpus
env:
matrix:
- ELM_VERSION=0.18.0 TARGET_NODE_VERSION=node
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;
git checkout 8cb9da66020fa4058e550bfae1182a12ac1e4eab;
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus;
make && make install;
cd ..;
fi
install:
- nvm install $TARGET_NODE_VERSION
- nvm use $TARGET_NODE_VERSION
- node --version
- npm --version
- npm install -g elm@$ELM_VERSION
- npm install -g elm-test
- npm install -g elm-format
- mv $(npm config get prefix)/bin/elm-make $(npm config get prefix)/bin/elm-make-old
- printf "#\041/bin/bash\n\necho \"Running elm-make with sysconfcpus -n 2\"\n\n$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
- npm install
- elm package install --yes
script:
- elm test
- elm-format --validate src/ tests/