@@ -35,21 +35,22 @@ compile_template: &COMPILE
3535 if test "$USE_CONFIG" = "yes"; then
3636 MAKE_OPTS=
3737 autoreconf -i
38- eval ./configure --enable-plugins --enable-werror $CONFIG_OPTS CFLAGS=\"-g -O3 $CFLAGS\" || \
38+ eval ./configure --enable-plugins --enable-werror $CONFIG_OPTS CFLAGS=\"$CFLAGS\" || \
3939 ( cat config.log; false )
4040 else
4141 MAKE_OPTS=-e
4242 fi
43+ make cc-version $MAKE_OPTS
4344 if test "x$DO_MAINTAINER_CHECKS" = "xyes"; then
44- make maintainer-check
45+ make maintainer-check $MAKE_OPTS
4546 fi
4647 make -j 4 $MAKE_OPTS
4748
4849test_template : &TEST
4950 test_script : |
50- make test-shlib-exports
51- make test
52- if test "x$DO_UNTRACKED_FILE_CHECK" = "xyes"; then make check-untracked ; fi
51+ make test-shlib-exports $MAKE_OPTS
52+ make test $MAKE_OPTS
53+ if test "x$DO_UNTRACKED_FILE_CHECK" = "xyes"; then make check-untracked $MAKE_OPTS ; fi
5354
5455# --------------------------------------------------
5556# Task: linux builds.
@@ -71,10 +72,14 @@ gcc_task:
7172 DO_MAINTAINER_CHECKS : yes
7273 DO_UNTRACKED_FILE_CHECK : yes
7374 USE_CONFIG : no
75+ CFLAGS : -g -O2 -Wall -Werror -fvisibility=hidden
7476 - environment :
7577 USE_CONFIG : yes
76- CFLAGS : -std=c99 -pedantic -Wformat=2
78+ # ubsan is incompatible with some -Wformat opts so we do that on clang.
79+ CFLAGS : -g -O3 -fsanitize=address,undefined -DHTS_ALLOW_UNALIGNED=0 -Wno-format-truncation -Wno-format-overflow
80+ LDFLAGS : -fsanitize=address,undefined
7781 USE_LIBDEFLATE : yes
82+ UBSAN_OPTIONS : print_stacktrace=1:halt_on_error=1
7883
7984 install_script : |
8085 apt-get update
@@ -105,11 +110,12 @@ ubuntu_task:
105110 matrix :
106111 - environment :
107112 USE_CONFIG : yes
113+ CFLAGS : -g -O3
108114 DO_UNTRACKED_FILE_CHECK : yes
109115 - environment :
116+ # Cirrus-CI's clang isn't installed with ubsan, so we do that in gcc
110117 USE_CONFIG : yes
111- CFLAGS : -g -Wall -O3 -fsanitize=address
112- LDFLAGS : -fsanitize=address
118+ CFLAGS : -g -O3 -std=c99 -pedantic -Wall -Wformat -Wformat=2
113119 USE_LIBDEFLATE : yes
114120
115121 # NB: we could consider building a docker image with these
@@ -137,7 +143,7 @@ rocky_task:
137143 LC_ALL : C
138144 CIRRUS_CLONE_DEPTH : 1
139145 USE_CONFIG : yes
140- CFLAGS : -std=gnu90
146+ CFLAGS : -g -O3 - std=gnu90 -Wall -Wformat -Wformat=2 -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers
141147
142148 # NB: we could consider building a docker image with these
143149 # preinstalled and specifying that instead, to speed up testing.
@@ -182,11 +188,10 @@ arm_ubuntu_task:
182188macosx_task :
183189 name : macosx + clang
184190 macos_instance :
185- image : ghcr.io/cirruslabs/macos-ventura-base:latest
191+ image : ghcr.io/cirruslabs/macos-runner:sonoma
186192
187193 environment :
188194 CC : clang
189- CFLAGS : " -Wall -arch arm64 -arch x86_64"
190195 LDFLAGS : " -arch arm64 -arch x86_64"
191196 LIBDEFLATE_CFLAGS : " -arch arm64 -arch x86_64"
192197 LC_ALL : C
@@ -195,9 +200,11 @@ macosx_task:
195200 matrix :
196201 - environment :
197202 USE_CONFIG : no
203+ CFLAGS : " -g -O3 -Wall -Werror -arch arm64 -arch x86_64"
198204 - environment :
199205 USE_CONFIG : yes
200206 USE_LIBDEFLATE : yes
207+ CFLAGS : " -g -O3 -Wall -arch arm64 -arch x86_64"
201208
202209 package_install_script : |
203210 HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool xz git \
0 commit comments