-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (61 loc) · 1.66 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
sudo: false
git:
depth: 1
language: node_js
node_js:
- "node"
cache:
directories:
- elm/elm-stuff/build-artifacts
- sysconfcpus
os:
- linux
env:
- ELM_VERSION=0.18.0 TARGET_NODE_VERSION=10.1
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
if [[ `npm -v` != 5* ]];
then npm i -g npm@5;
fi
install:
- nvm install $TARGET_NODE_VERSION
- nvm use $TARGET_NODE_VERSION
- node --version
- npm --version
- npm install -g elm@$ELM_VERSION webpack@3.11.0 mocha
- mv $(npm config get prefix)/bin/elm-make $(npm config get prefix)/bin/elm-make-old
- echo -e "#\!/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
script:
- cd elm
- ../node_modules/elm-test/bin/elm-test
- cd ..
- npm test
- cd elm/src
- elm-make Demo/Main.elm
- mv index.html Demo
- cd ../..
deploy:
- provider: npm
email: $EMAIL
api_key: $NPM_API_KEY
on:
branch: master
tag: latest
skip_cleanup: true
- provider: pages
skip-cleanup: true
local-dir: elm/src/Demo
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
#keep-history: true
on:
branch: master