-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
40 lines (34 loc) · 1.67 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
sudo: false # don't need root access on Travis-CI (builds faster without sudo!)
language: node_js # elm is installed from npm (see install below)
node_js: node # use "latest" version of Node.js
env:
- ELM_VERSION=0.18.0 ELM_TEST=0.18.12
cache:
directories: # so subsequent builds run faster
- elm-stuff/build-artifacts
- elm-stuff/packages
- tests/elm-stuff/build-artifacts # elm-test init creates a "tests/" dir
- tests/elm-stuff/packages # cache files that haven't changed
- sysconfcpus
- $HOME/.npm # https://stackoverflow.com/a/42523517/1148249
before_install:
- uname -a # print the *exact* operating system/kernel version
- | # build time improvement see: https://git.io/vQcqz
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: # install specific versions of elm & elm-test
- npm install -g elm@$ELM_VERSION elm-test@$ELM_TEST elm-format@exp
# the next 3 lines are courtesy of @rtfeldman https://git.io/vbj0j
- 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
- travis_retry elm package install --yes # install main project dependencies
script:
- elm-format --validate PhotoGroove.elm # lint / format-check main file
- elm-test --verbose # run the tests!