2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-10-31 19:02:30 +00:00
qpdf/build-scripts/build-linux
Jay Berkenbilt 06c6f9a971 Enable verbose build for CI
That way we can always ensure that the right compiler flags are being
used if there is an issue.
2022-10-06 07:14:23 -04:00

27 lines
957 B
Bash
Executable File

#!/bin/bash
set -ex
sudo apt-get update
sudo apt-get -y install \
build-essential cmake zlib1g-dev libjpeg-dev libgnutls28-dev \
libssl-dev libtiff-tools ghostscript
cmake -S . -B build -DCI_MODE=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1
cmake --build build --verbose -j$(nproc) -- -k
cd build
# Make sure char is signed by default -- see also test-unsigned-char
./qpdf/test_char_sign | grep 'char is signed'
# libtests automatically runs with all crypto providers.
env QPDF_TEST_COMPARE_IMAGES=1 ctest --verbose
# Run just qpdf tests with remaining crypto providers.
for i in $(./qpdf/qpdf --show-crypto | tail -n +2); do
echo "*** Running qpdf tests with crypto provider $i"
env QPDF_CRYPTO_PROVIDER=$i ctest --verbose -R '^qpdf$'
done
cd ..
export TMPDIR=$PWD/dist-tmp
rm -rf $TMPDIR
./make_dist --ci
mkdir distribution
cp $TMPDIR/qpdf*-ci.tar.gz distribution
sha256sum distribution/*