forked from dlang/dmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
169 lines (157 loc) · 4.68 KB
/
.cirrus.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# Test
common_steps_template: &COMMON_STEPS_TEMPLATE
install_prerequisites_script: ./ci/cirrusci.sh
install_host_compiler_script: ./ci/run.sh install_host_compiler
setup_repos_script: |
set -uexo pipefail
ln -s $CIRRUS_WORKING_DIR ../dmd
if [ -z ${CIRRUS_PR+x} ] ; then
# not a PR
REPO_BRANCH="$CIRRUS_BRANCH"
else
# PR - merge with target branch first
git fetch origin "+refs/pull/$CIRRUS_PR/merge:"
git checkout -f FETCH_HEAD
if [[ ! "$CIRRUS_BRANCH" =~ ^pull/ ]]; then
# PR originating from the official dlang repo
REPO_BRANCH="$CIRRUS_BRANCH"
else
# PR from a fork
REPO_BRANCH="$CIRRUS_BASE_BRANCH"
fi
fi
./ci/run.sh setup_repos "$REPO_BRANCH"
build_script: ./ci/run.sh build
test_dmd_script: |
if [ "${DMD_TEST_COVERAGE:-0}" == "1" ]
then
OS_NAME=$OS ENABLE_RELEASE=0 ENABLE_DEBUG=1 ENABLE_COVERAGE=1 ./ci/run.sh rebuild
./ci/run.sh test_dmd
./ci/run.sh codecov
else
./ci/run.sh test_dmd
fi
test_druntime_script: \[ "${DMD_TEST_COVERAGE:-0}" == "1" \] || ./ci/run.sh test_druntime
test_phobos_script: \[ "${DMD_TEST_COVERAGE:-0}" == "1" \] || ./ci/run.sh test_phobos
environment:
CIRRUS_CLONE_DEPTH: 50
# for ci/run.sh:
MODEL: 64
HOST_DMD: dmd
N: 4
OS_NAME: linux
FULL_BUILD: true
coverage_environment_template: &COVERAGE_ENVIRONMENT_TEMPLATE
DMD_TEST_COVERAGE: 1
CODECOV_TOKEN: ENCRYPTED[cc6ce01618eaee6c9a08ebc81446a9233588df3b2c6ba4e30ffb7715ee9815734ccfd9fcec4f6abfc6a1b9dd8253110d]
# Linux
linux_task:
name: Ubuntu 18.04 $TASK_NAME_SUFFIX
container:
image: ubuntu:18.04
cpu: 4
memory: 8G
timeout_in: 60m
environment:
matrix:
- TASK_NAME_SUFFIX: x86, DMD (latest)
MODEL: 32
- TASK_NAME_SUFFIX: x86, DMD (coverage)
MODEL: 32
<< : *COVERAGE_ENVIRONMENT_TEMPLATE
- TASK_NAME_SUFFIX: x86, DMD (bootstrap)
MODEL: 32
HOST_DMD: dmd-2.097.1
- TASK_NAME_SUFFIX: x64, DMD (latest)
# Enable this to replace coverage tests on CircleCI
# - TASK_NAME_SUFFIX: x64, DMD (coverage)
# << : *COVERAGE_ENVIRONMENT_TEMPLATE
- TASK_NAME_SUFFIX: x64, DMD (bootstrap)
HOST_DMD: dmd-2.079.0
- TASK_NAME_SUFFIX: x64, LDC
HOST_DC: ldc #TODO: Update to HOST_DMD when support for HOST_DC is removed
- TASK_NAME_SUFFIX: x64, GDC
HOST_DMD: gdmd-9
<< : *COMMON_STEPS_TEMPLATE
# Mac
macos12_task:
name: macOS 12.x x64, $TASK_NAME_SUFFIX
osx_instance:
image: monterey-xcode
timeout_in: 60m
environment:
OS_NAME: darwin
# override Cirrus default OS (`darwin`)
OS: osx
# 12 CPU cores and 24 GB of memory are available
N: 12
# FIXME: Temporarily use LDC until a release with a fix for issue 22942 is available (probably 2.101)
HOST_DMD: ldc
matrix:
- TASK_NAME_SUFFIX: DMD (latest)
- TASK_NAME_SUFFIX: DMD (coverage)
<< : *COVERAGE_ENVIRONMENT_TEMPLATE
<< : *COMMON_STEPS_TEMPLATE
macos11_task:
name: macOS 11.x x64, $TASK_NAME_SUFFIX
osx_instance:
image: big-sur-xcode
timeout_in: 60m
environment:
OS_NAME: darwin
# override Cirrus default OS (`darwin`)
OS: osx
# 12 CPU cores and 24 GB of memory are available
N: 12
matrix:
- TASK_NAME_SUFFIX: DMD (latest)
- TASK_NAME_SUFFIX: DMD (coverage)
<< : *COVERAGE_ENVIRONMENT_TEMPLATE
<< : *COMMON_STEPS_TEMPLATE
macos10_task:
name: macOS 10.15 x64, DMD (bootstrap)
osx_instance:
image: big-sur-xcode
timeout_in: 60m
environment:
OS_NAME: darwin
# override Cirrus default OS (`darwin`)
OS: osx
# 12 CPU cores and 24 GB of memory are available
N: 12
# de-facto bootstrap version on OSX
# See: https://forum.dlang.org/post/qfsgt2$1goc$1@digitalmars.com
HOST_DMD: dmd-2.088.0
<< : *COMMON_STEPS_TEMPLATE
# FreeBSD
freebsd13_task:
name: FreeBSD 13.0 x64, DMD ($TASK_NAME_TYPE)
freebsd_instance:
image_family: freebsd-13-0
cpu: 4
memory: 8G
timeout_in: 60m
environment:
OS_NAME: freebsd
CI_DFLAGS: -version=TARGET_FREEBSD13
matrix:
- TASK_NAME_TYPE: latest
- TASK_NAME_TYPE: coverage
<< : *COVERAGE_ENVIRONMENT_TEMPLATE
install_bash_script: pkg install -y bash
<< : *COMMON_STEPS_TEMPLATE
freebsd12_task:
name: FreeBSD 12.3 x64, DMD (bootstrap)
freebsd_instance:
image_family: freebsd-12-3
cpu: 4
memory: 8G
timeout_in: 60m
environment:
OS_NAME: freebsd
HOST_DMD: dmd-2.095.0
CI_DFLAGS: -version=TARGET_FREEBSD12
install_bash_script: |
sed -i '' -e 's|pkg.FreeBSD.org|mirrors.xtom.com/freebsd-pkg|' /etc/pkg/FreeBSD.conf
pkg install -y bash
<< : *COMMON_STEPS_TEMPLATE