2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

Run tests in CI with char as unsigned char

This commit is contained in:
Jay Berkenbilt 2022-09-23 17:24:46 -04:00
parent 9a9a7ab097
commit a085479ad9
2 changed files with 25 additions and 0 deletions

View File

@ -130,3 +130,10 @@ jobs:
- uses: actions/checkout@v2
- name: 'Sanitizer Tests'
run: build-scripts/test-sanitizers
UnsignedChar:
runs-on: ubuntu-latest
needs: Prebuild
steps:
- uses: actions/checkout@v2
- name: 'Unsigned Char Tests'
run: build-scripts/test-unsigned-char

View File

@ -0,0 +1,18 @@
#!/bin/bash
set -e
sudo apt-get update
sudo apt-get -y install \
build-essential cmake \
zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
# Some platforms have unsigned-char by default, but Intel doesn't.
# This ensures that we catch code that would fail if char were
# unsigned by default.
env CFLAGS="-funsigned-char" \
CXXFLAGS="-funsigned-char" \
cmake -S . -B build \
-DCI_MODE=1 -DBUILD_STATIC_LIBS=0 -DCMAKE_BUILD_TYPE=Release \
-DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1 \
-DENABLE_QTC=1
cmake --build build -j$(nproc) -- -k
cd build
ctest --verbose