forked from elixir-lang/elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
168 lines (131 loc) · 4.29 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
env:
CIRRUS_CLONE_DEPTH: 50
ELIXIR_ASSERT_TIMEOUT: 2000
ELIXIRC_OPTS: "--warnings-as-errors"
ERLC_OPTS: "+warnings_as_errors"
LANG: C.UTF-8
test_template: &DEFAULT_TEST_SETTINGS
# don't cancel the task execution if it's master or a release branch
auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH !=~ 'v\d+\.\d+.*'
test_linux_task:
<<: *DEFAULT_TEST_SETTINGS
container:
image: buildpack-deps:trusty
cpu: 8
memory: 1536Mi
env:
PATH: "${CIRRUS_WORKING_DIR}/otp/bin:${PATH}"
matrix:
- name: Linux, ${OTP_RELEASE}, Ubuntu 14.04
alias: Linux Stable
matrix:
- env:
CHECK_POSIX_COMPLIANT: true
CHECK_REPRODUCIBLE: true
OTP_RELEASE: OTP-22.1
- env:
OTP_RELEASE: OTP-22.0
- env:
OTP_RELEASE: OTP-21.3.8
- env:
OTP_RELEASE: OTP-21.2
- env:
OTP_RELEASE: OTP-21.1
- env:
OTP_RELEASE: OTP-21.0
- name: Linux, OTP-${OTP_RELEASE}, development, Ubuntu 14.04
alias: Linux Development
allow_failures: true
skip_notifications: true
depends_on:
- Linux Stable
- FreeBSD Stable
matrix:
- env:
OTP_RELEASE: master
- env:
OTP_RELEASE: maint
install_script:
- wget -O otp.tar.gz https://repo.hex.pm/builds/otp/ubuntu-14.04/${OTP_RELEASE}.tar.gz
- mkdir -p otp
- tar zxf otp.tar.gz -C otp --strip-components=1
- otp/Install -minimal ${CIRRUS_WORKING_DIR}/otp
- rm -rf .git
- make compile
build_info_script: bin/elixir --version
test_formatted_script:
- make test_formatted &&
echo "All Elixir source code files are properly formatted."
dialyzer_script: dialyzer -pa lib/elixir/ebin --build_plt --output_plt elixir.plt --apps lib/elixir/ebin/elixir.beam lib/elixir/ebin/Elixir.Kernel.beam
test_erlang_script: make test_erlang
test_elixir_script: make test_elixir
check_posix_compliant_script: |
if [ -n "$CHECK_POSIX_COMPLIANT" ]; then
apt update
apt install -y shellcheck
shellcheck -e SC2039,2086 bin/elixir && echo "bin/elixir is POSIX compliant"
shellcheck bin/elixirc && echo "bin/elixirc is POSIX compliant"
shellcheck bin/iex && echo "bin/iex is POSIX compliant"
else
echo "The format of the shell scripts is only checked in the last stable Erlang/OTP version."
fi
check_reproducible_script: |
if [ -n "$CHECK_REPRODUCIBLE" ]; then
make check_reproducible
else
echo "The reproducibility of the build is only checked in the last stable Erlang/OTP version."
fi
test_windows_task:
<<: *DEFAULT_TEST_SETTINGS
name: Windows, OTP-${OTP_RELEASE}, Windows Server 2019
alias: Windows Stable
matrix:
- env:
OS_VERSION: 2019
OTP_RELEASE: 22.0
- env:
OS_VERSION: 2019
OTP_RELEASE: 21.0.1
windows_container:
image: fertapric/elixir-ci:otp-win64-${OTP_RELEASE}
os_version: ${OS_VERSION}
cpu: 4
memory: 3840Mi
install_script:
- rmdir /s /q .git
- make compile
build_info_script: bin/elixir --version
test_formatted_script:
- make test_formatted &&
echo "All Elixir source code files are properly formatted."
test_erlang_script: make --keep-going test_erlang
test_elixir_script: make --keep-going test_elixir
test_freebsd_task:
<<: *DEFAULT_TEST_SETTINGS
name: FreeBSD 12.0
alias: FreeBSD Stable
freebsd_instance:
image_family: freebsd-12-0
cpu: 8
memory: 7424Mi
env:
CHECK_REPRODUCIBLE: true
LC_ALL: en_US.UTF-8
install_script:
- sudo pkg update
- pkg install -y erlang git gmake
- rm -rf .git
- gmake compile
build_info_script: bin/elixir --version
test_formatted_script:
- gmake test_formatted &&
echo "All Elixir source code files are properly formatted."
dialyzer_script: dialyzer -pa lib/elixir/ebin --build_plt --output_plt elixir.plt --apps lib/elixir/ebin/elixir.beam lib/elixir/ebin/Elixir.Kernel.beam
test_erlang_script: gmake test_erlang
test_elixir_script: gmake test_elixir
check_reproducible_script: |
if [ -n "$CHECK_REPRODUCIBLE" ]; then
gmake check_reproducible
else
echo "The reproducibility of the build is only checked in the last stable Erlang/OTP version."
fi