-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
76 lines (68 loc) · 1.71 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
69
70
71
72
73
74
75
76
# Travis config for Synthesis
language: c
cache:
directories:
- nim-devel
- nim-stable
matrix:
include:
# Build and test against the master (stable) and devel branches of Nim
# Build and test using both gcc and clang
# Build and test on both x86-64 and ARM64
- os: linux
env: CHANNEL=stable
compiler: gcc
- os: linux
arch: arm64
env: CHANNEL=stable
compiler: gcc
- os: linux
env: CHANNEL=devel
compiler: clang
# On OSX we only test against clang (gcc is mapped to clang by default)
- os: osx
env: CHANNEL=stable
compiler: clang
allow_failures:
# Ignore failures when building against the devel Nim branch
- env: CHANNEL=devel
fast_finish: true
before_install:
- |
if [ "${CHANNEL}" = stable ]; then
BRANCH="v$(curl https://nim-lang.org/channels/stable)"
else
BRANCH="${CHANNEL}"
fi
install:
# Detect caching of Nim compiler
- |
if [ ! -x "nim-${CHANNEL}/bin/nim" ]; then
git clone -b "${BRANCH}" https://github.com/nim-lang/nim "nim-${CHANNEL}/"
pushd "nim-${CHANNEL}"
git clone --depth 1 https://github.com/nim-lang/csources csources/
pushd csources
sh build.sh
popd
rm -rf csources
bin/nim c koch
./koch boot -d:release
./koch tools
else
pushd "nim-${CHANNEL}"
git fetch origin "${BRANCH}"
if [ git merge FETCH_HEAD | grep -c "Already up to date." -ne 1 ]; then
bin/nim c koch
./koch boot -d:release
./koch tools
fi
fi
popd
before_script:
- export PATH="$PWD/nim-${CHANNEL}/bin${PATH:+:$PATH}"
script:
- nimble refresh
- nimble test
branches:
except:
- gh-pages