if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
run: |
sudo apt-get update
- sudo apt-get install -y autoconf automake build-essential po4a autopoint gcc-multilib doxygen musl-tools
+ sudo apt-get install -y autoconf automake build-essential po4a autopoint gcc-multilib doxygen musl-tools valgrind
# Install Autotools on Mac
- name: Install Dependencies
./build-aux/ci_build.sh -b autotools -p test -f "-fsanitize=address,undefined" -d sandbox
cd ../xz_build && make distclean
+ - name: Build with Valgrind
+ if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
+ run: ./build-aux/ci_build.sh -b autotools -p build -d sandbox
+ - name: Test with Valgrind
+ if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
+ run: |
+ ./build-aux/ci_build.sh -b autotools -p test -d sandbox -w "valgrind --quiet --trace-children=yes --exit-on-first-error=yes --error-exitcode=1"
+ cd ../xz_build && make distclean
+
- name: Build with musl libc
if: ${{ matrix.os == 'ubuntu-latest'}}
run: ./build-aux/ci_build.sh -b ${{ matrix.build_system }} -p build -m "/usr/bin/musl-gcc"
# Parse arguments #
###################
-while getopts a:b:c:d:l:m:n:s:p:f:h opt; do
+while getopts a:b:c:d:l:m:n:s:p:f:w:h opt; do
# b option can have either value "autotools" OR "cmake"
case ${opt} in
h)
CFLAGS="$OPTARG"
export CFLAGS
;;
+ w) WRAPPER="$OPTARG"
+ ;;
esac
done
autotools)
cd "$DEST_DIR"
# If the tests fail, copy the test logs into the artifacts folder
- if make check
+ if make check LOG_COMPILER="$WRAPPER"
then
:
else
;;
cmake)
cd "$DEST_DIR"
- if make test
+ if ${WRAPPER} make test
then
:
else