Skip to content

Commit 6a1570b

Browse files
committed
Rework Travis config
1 parent afad3c5 commit 6a1570b

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

.travis.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
11
language: c
2-
before_install:
3-
- |
4-
if [ "$TRAVIS_BRANCH" = master ]; then
5-
export branch=master
6-
else
7-
export branch=devel
8-
fi
2+
env:
3+
- nim_branch=master
4+
- nim_branch=devel
5+
matrix:
6+
allow_failures:
7+
- env: nim_branch=devel
8+
fast_finish: true
99
install:
1010
- |
11-
if [ ! -x nim-$branch/bin/nim ]; then
12-
git clone -b $branch --depth 1 git://github.com/nim-lang/nim nim-$branch/
13-
cd nim-$branch
14-
git clone -b $branch --depth 1 git://github.com/nim-lang/csources csources/
11+
if [ ! -x nim-$nim_branch/bin/nim ]; then
12+
git clone -b $nim_branch --depth 1 git://github.com/nim-lang/nim nim-$nim_branch/
13+
cd nim-$nim_branch
14+
git clone --depth 1 git://github.com/nim-lang/csources csources/
1515
cd csources
1616
sh build.sh
1717
cd ..
1818
rm -rf csources
1919
bin/nim c koch
2020
./koch boot -d:release
21-
cd ..
2221
else
23-
cd nim-$branch
22+
cd nim-$nim_branch
2423
git fetch origin
2524
if ! git merge FETCH_HEAD | grep "Already up-to-date"; then
2625
bin/nim c koch
2726
./koch boot -d:release
2827
fi
29-
cd ..
3028
fi
29+
cd ..
3130
before_script:
32-
- export PATH=nim-$branch/bin:$PATH
31+
- export PATH="nim-$nim_branch/bin${PATH:+:$PATH}"
3332
script:
3433
- nim compile --verbosity:0 --run test/test
3534
cache:
3635
directories:
3736
- nim-master
3837
- nim-devel
39-
sudo: required
4038
dist: trusty

0 commit comments

Comments
 (0)