forked from snazzy-d/sdc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (65 loc) · 1.8 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
language: d
# Use container based infrastructure.
sudo: false
d:
- dmd-2.079.1
matrix:
include:
- os: linux
d: dmd
- os: osx
d: dmd
- os: linux
d: dmd
env: SEPARATE_LIBD_COMPILATION=1
cache:
directories:
- llvm-3.9.0-linux
- llvm-3.9.0-osx
env:
global:
- LLVM_VERSION=4.0.1
- DMD_VERSION=2.079.1
addons:
apt:
sources:
# See here for name of the travis apt repos:
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
- ubuntu-toolchain-r-test
packages:
- nasm
- build-essential
- binutils-gold
- libstdc++6
before_install:
- export LLVM_DIR="llvm-${LLVM_VERSION}-${TRAVIS_OS_NAME}";
-
if [ -z "$(ls -A \"${LLVM_DIR}\")" ]; then
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
LLVM_ARCH="linux-gnu-debian8";
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
LLVM_ARCH="apple-darwin";
else
echo "${LLVM_ARCH} is not supported";
exit 2;
fi;
wget -O "llvm-${LLVM_VERSION}.tar.xz" "http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-${LLVM_ARCH}.tar.xz";
mkdir "${LLVM_DIR}";
tar -xvf "llvm-${LLVM_VERSION}.tar.xz" --strip 1 -C "${LLVM_DIR}";
fi;
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew update;
brew install nasm;
fi;
- export LLVM_CONFIG="${LLVM_DIR}/bin/llvm-config";
- export DMD_ROOT_PATH="${HOME}/dlang/dmd-${DMD_VERSION}"
- export NATIVE_DMD_IMPORTS="-I${DMD_ROOT_PATH}/src/druntime/import -I${DMD_ROOT_PATH}/src/phobos"
- echo $(nasm -v)
- echo $($LLVM_CONFIG --version);
- echo $(dmd --version)
script:
- make bin/sdc
- make bin/sdunit
- make lib/libsdrt.a
# Because lit is gone (used to be in llvm-3.9-tools) we can only run testrunner.
- make check-sdc