-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis.sh
executable file
·36 lines (30 loc) · 1.2 KB
/
travis.sh
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
#!/bin/bash
set -exo pipefail
N=2
git clone --depth=1 https://github.com/D-Programming-Language/druntime.git ../druntime
git clone --depth=1 https://github.com/D-Programming-Language/phobos.git ../phobos
make -j$N -C src -f posix.mak HOST_DMD=$DMD all
make -j$N -C src -f posix.mak HOST_DMD=$DMD dmd.conf
make -j$N -C ../druntime -f posix.mak
make -j$N -C ../phobos -f posix.mak
while [ $SELF_COMPILE -gt 0 ]; do
# rebuild dmd using the just build dmd as host compiler
mv src/dmd src/host_dmd
make -j$N -C src -f posix.mak HOST_DMD=./host_dmd clean
make -j$N -C src -f posix.mak HOST_DMD=./host_dmd dmd.conf
make -j$N -C src -f posix.mak HOST_DMD=./host_dmd
make -j$N -C ../druntime -f posix.mak clean
make -j$N -C ../druntime -f posix.mak
make -j$N -C ../phobos -f posix.mak clean
make -j$N -C ../phobos -f posix.mak
rm src/host_dmd
SELF_COMPILE=$(($SELF_COMPILE - 1))
done
make -j$N -C ../druntime -f posix.mak unittest
make -j$N -C ../phobos -f posix.mak unittest
# test fewer compiler argument permutations for PRs to reduce CI load
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
make -j$N -C test MODEL=64
else
make -j$N -C test MODEL=64 ARGS="-O -inline -release"
fi