Skip to content

Commit

Permalink
Use --enable-libgsl --enable-perl-filters when testing
Browse files Browse the repository at this point in the history
Add packages needed for these options and enable them
on configure builds.  The perl IO::Pty package is also added
for Debian and Ubuntu so the usage tests work.

Also adjust how flags are set in the CI builds to ensure they
are applied consistently.
  • Loading branch information
daviesrob authored and pd3 committed Oct 31, 2024
1 parent 8310af3 commit ac15fea
Showing 1 changed file with 38 additions and 10 deletions.
48 changes: 38 additions & 10 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,34 @@ compile_template: &COMPILE
if test "$USE_CONFIG" = "yes"; then
(cd $HTSDIR && autoreconf -i)
autoreconf -i
./configure --enable-werror || (cat config.log; /bin/false)
./configure --enable-werror $CONFIG_OPTS \
${CC:+CC="$CC"} \
${CFLAGS:+CFLAGS="$CFLAGS"} \
${CPPFLAGS:+CPPFLAGS="$CPPFLAGS"} \
${LDFLAGS:+LDFLAGS="$LDFLAGS"} \
|| (cat config.log; /bin/false)
make -j3
else
make -j3 plugindir=$CIRRUS_WORKING_DIR/plugins -e
make -j3 plugindir="$CIRRUS_WORKING_DIR/plugins" \
${HTSDIR:+HTSDIR="$HTSDIR"} \
${CC:+CC="$CC"} \
${CFLAGS:+CFLAGS="$CFLAGS"} \
${CPPFLAGS:+CPPFLAGS="$CPPFLAGS"} \
${LDFLAGS:+LDFLAGS="$LDFLAGS"}
fi
test_template: &TEST
test_script: |
make -e test
if test "$USE_CONFIG" = "yes"; then
make test
else
make test \
${HTSDIR:+HTSDIR="$HTSDIR"} \
${CC:+CC="$CC"} \
${CFLAGS:+CFLAGS="$CFLAGS"} \
${CPPFLAGS:+CPPFLAGS="$CPPFLAGS"} \
${LDFLAGS:+LDFLAGS="$LDFLAGS"}
fi
#--------------------------------------------------
# Task: linux builds.
Expand All @@ -68,15 +86,23 @@ gcc_task:
LC_ALL: C
CIRRUS_CLONE_DEPTH: 1
HTSDIR: ./htslib
CFLAGS: -fsanitize=address
LDFLAGS: -fsanitize=address

matrix:
- environment:
USE_CONFIG: no
CFLAGS: -g -Og -Wall -Werror -fsanitize=address
LDFLAGS: -fsanitize=address
- environment:
USE_CONFIG: yes
CFLAGS: -std=gnu99 -O0
CONFIG_OPTS: --enable-libgsl --enable-perl-filters
CFLAGS: -std=gnu99 -g -Og -Wall -fsanitize=address
LDFLAGS: -fsanitize=address

install_script: |
apt-get update
apt-get install -y --no-install-suggests --no-install-recommends \
libdeflate-dev libperl-dev libgsl0-dev libio-pty-perl
<< : *COMPILE
<< : *TEST
Expand All @@ -92,18 +118,19 @@ ubuntu_task:

environment:
CC: clang
CFLAGS: -g -O2 -Werror -Wall -Wformat -Wformat=2
LC_ALL: C
CIRRUS_CLONE_DEPTH: 1
HTSDIR: ./htslib

matrix:
- environment:
USE_CONFIG: no
CFLAGS: -g -O2 -Werror -Wall -Wformat -Wformat=2
- container:
memory: 2G
environment:
USE_CONFIG: yes
CONFIG_OPTS: --enable-libgsl --enable-perl-filters
CFLAGS: -g -Wall -O3
LDFLAGS: -Wl,-rpath,`pwd`/inst/lib

Expand All @@ -114,7 +141,7 @@ ubuntu_task:
apt-get install -y --no-install-suggests --no-install-recommends \
ca-certificates clang git autoconf automake \
make zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev \
libssl-dev libdeflate-dev
libssl-dev libdeflate-dev libperl-dev libgsl0-dev libio-pty-perl
<< : *COMPILE
<< : *TEST
Expand All @@ -133,13 +160,14 @@ rockylinux_task:
CIRRUS_CLONE_DEPTH: 1
HTSDIR: ./htslib
USE_CONFIG: yes
CONFIG_OPTS: --enable-libgsl --enable-perl-filters

# 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 \
git diffutils
git diffutils gsl-devel perl-ExtUtils-Embed
<< : *COMPILE
<< : *TEST
Expand Down

0 comments on commit ac15fea

Please sign in to comment.