forked from samtools/htslib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
209 lines (174 loc) · 5.24 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Note we have a maximum of 16 CPUs available, so adjust our
# builds so we can start all concurrently without needing to schedule.
# Sadly though there is still a finite limit to macOS of one instance.
# Can we cull our Mac test to just one instance?
timeout_in: 20m
#--------------------------------------------------
# Template: build libdeflate dependency
libdeflate_template: &LIBDEFLATE
libdeflate_script: |
if test "x$USE_LIBDEFLATE" == "xyes"; then
pushd "$HOME"
git clone --depth 1 https://github.com/ebiggers/libdeflate.git
pushd libdeflate
cmake -B build -DLIBDEFLATE_BUILD_SHARED_LIB=OFF -DLIBDEFLATE_BUILD_GZIP=OFF -DCMAKE_C_FLAGS="-g -O3 -fPIC $LIBDEFLATE_CFLAGS"
cmake --build build --verbose
popd
popd
fi
#--------------------------------------------------
# Template: compile and test
compile_template: &COMPILE
compile_script: |
git submodule update --init --recursive
if test "x$USE_LIBDEFLATE" = "xyes"; then
CONFIG_OPTS='CPPFLAGS="-I$HOME/libdeflate" LDFLAGS="$LDFLAGS -L$HOME/libdeflate/build" --with-libdeflate'
else
CONFIG_OPTS='--without-libdeflate'
fi
if test "$USE_CONFIG" = "yes"; then
MAKE_OPTS=
autoreconf -i
eval ./configure --enable-plugins --enable-werror $CONFIG_OPTS CFLAGS=\"-g -O3 $CFLAGS\" || \
( cat config.log; false )
else
MAKE_OPTS=-e
fi
if test "x$DO_MAINTAINER_CHECKS" = "xyes"; then
make maintainer-check
fi
make -j 4 $MAKE_OPTS
test_template: &TEST
test_script: |
make test-shlib-exports
make test
if test "x$DO_UNTRACKED_FILE_CHECK" = "xyes"; then make check-untracked ; fi
#--------------------------------------------------
# Task: linux builds.
# Debian + latest GCC
gcc_task:
name: debian-gcc
container:
image: gcc:latest
cpu: 2
memory: 1G
environment:
LC_ALL: C
CIRRUS_CLONE_DEPTH: 1
matrix:
- environment:
DO_MAINTAINER_CHECKS: yes
DO_UNTRACKED_FILE_CHECK: yes
USE_CONFIG: no
- environment:
USE_CONFIG: yes
CFLAGS: -std=c99 -pedantic -Wformat=2
USE_LIBDEFLATE: yes
install_script: |
apt-get update
apt-get install -y --no-install-suggests --no-install-recommends \
ca-certificates libc-dev make git autoconf automake \
zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev \
cmake
<< : *LIBDEFLATE
<< : *COMPILE
<< : *TEST
# Ubuntu + Clang
ubuntu_task:
name: ubuntu-clang
container:
image: ubuntu:latest
# image: ubuntu:devel
cpu: 2
memory: 1G
environment:
CC: clang
LC_ALL: C
CIRRUS_CLONE_DEPTH: 1
matrix:
- environment:
USE_CONFIG: yes
DO_UNTRACKED_FILE_CHECK: yes
- environment:
USE_CONFIG: yes
CFLAGS: -g -Wall -O3 -fsanitize=address
LDFLAGS: -fsanitize=address
USE_LIBDEFLATE: yes
# NB: we could consider building a docker image with these
# preinstalled and specifying that instead, to speed up testing.
install_script: |
apt-get update
apt-get install -y --no-install-suggests --no-install-recommends \
ca-certificates clang libc-dev make git autoconf automake \
zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev \
libdeflate-dev
<< : *COMPILE
<< : *TEST
# Rocky Linux
rocky_task:
name: rockylinux-gcc
container:
image: rockylinux:9
cpu: 2
memory: 1G
environment:
LC_ALL: C
CIRRUS_CLONE_DEPTH: 1
USE_CONFIG: yes
CFLAGS: -std=gnu90
# NB: we could consider building a docker image with these
# preinstalled and specifying that instead, to speed up testing.
install_script: |
yum install -y autoconf automake make gcc perl-Data-Dumper perl-FindBin \
zlib-devel bzip2 bzip2-devel xz-devel curl-devel openssl-devel \
ncurses-devel diffutils git
<< : *COMPILE
<< : *TEST
# Arm Linux
arm_ubuntu_task:
name: ubuntu-arm
arm_container:
image: ubuntu:latest
cpu: 2
memory: 1G
environment:
LC_ALL: C
CIRRUS_CLONE_DEPTH: 1
DO_UNTRACKED_FILE_CHECK: yes
USE_CONFIG: yes
CFLAGS: -g -Wall -O3 -std=c99 -pedantic
# NB: we could consider building a docker image with these
# preinstalled and specifying that instead, to speed up testing.
install_script: |
apt-get update
apt-get install -y --no-install-suggests --no-install-recommends \
ca-certificates clang libc-dev make git autoconf automake \
zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev \
libdeflate-dev
<< : *COMPILE
<< : *TEST
#--------------------------------------------------
# Task: macOS builds
macosx_task:
name: macosx + clang
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
environment:
CC: clang
CFLAGS: "-Wall -arch arm64 -arch x86_64"
LDFLAGS: "-arch arm64 -arch x86_64"
LIBDEFLATE_CFLAGS: "-arch arm64 -arch x86_64"
LC_ALL: C
CIRRUS_CLONE_DEPTH: 1
matrix:
- environment:
USE_CONFIG: no
- environment:
USE_CONFIG: yes
USE_LIBDEFLATE: yes
package_install_script: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool xz git \
cmake
<< : *LIBDEFLATE
<< : *COMPILE
<< : *TEST