forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
73 lines (67 loc) · 2.83 KB
/
circle.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
# Requires the BETA setting to use Ubunty 14.04 Trusty
machine:
environment:
PATH: "~/$CIRCLE_PROJECT_REPONAME/ldc2-1.0.0-alpha1-linux-x86_64/bin:$PATH"
dependencies:
cache_directories:
- ldc2-1.0.0-alpha1-linux-x86_64
pre:
- sudo add-apt-repository -y 'deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main'
- wget -q -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-get update
- if [[ ! -e ldc2-1.0.0-alpha1-linux-x86_64/bin/ldc2 ]]; then wget https://github.com/ldc-developers/ldc/releases/download/v1.0.0-alpha1/ldc2-1.0.0-alpha1-linux-x86_64.tar.xz && xzcat ldc2-1.0.0-alpha1-linux-x86_64.tar.xz | tar -xvf - ; fi
override:
- sudo apt-get remove clang
- sudo apt-get install gcc-4.9 g++-4.9 gcc-4.9-multilib g++-4.9-multilib libconfig++8-dev llvm-3.9 llvm-3.9-dev clang-3.9 libedit-dev
- pip install --user lit
post:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 99
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 99
- sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 99
- sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 99
- gcc --version
- clang --version
- ldc2 -version
- python -c "import lit; lit.main();" --version | head -n 1
checkout:
post:
- git submodule sync
- git submodule update --init
test:
pre:
- CC=clang CXX=clang++ cmake .
- make -j4
- bin/ldc2 -version || exit 1
override:
- MAKEOPTS=-j2 ctest -j 2 --verbose -R "build-"
- CC="" MAKEOPTS=-j4 ctest --verbose -R "dmd-testsuite"
- ctest --output-on-failure -R "lit-tests"
- MAKEOPTS=-j3 ctest --verbose -R "-test-runner"
- ctest -j4 --output-on-failure -E "testsuite"
# To add more value the test results could be collected, see https://circleci.com/docs/test-metadata
# A way how to convert the ctest output is described here:
# http://stackoverflow.com/questions/6329215/how-to-get-ctest-results-in-hudson-jenkins
# The tests could be run in 4 parallel containers. The syntax is shown below.
# The containers were started but only the tests from container 0 were run.
# Containers 1-3 also started the tests but stop with the message
# "No tests were found!!!"
#
# - ? |
# echo $CIRCLE_NODE_INDEX
# case $CIRCLE_NODE_INDEX in
# 0)
# MAKEOPTS=-j8 ctest -j4 --verbose -R "build-phobos2-ldc-unittest"
# ;;
# 1)
# MAKEOPTS=-j8 ctest -j4 --verbose -R "build-druntime-ldc-unittest"
# ;;
# 2)
# CC="" MAKEOPTS=-j8 ctest --verbose -R "dmd-testsuite"
# ;;
# 3)
# MAKEOPTS=-j8 ctest --verbose -R "-test-runner"
# ;;
# esac
# :
# parallel: true
# - ctest -j8 --output-on-failure -E "testsuite"