aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-09-23 23:24:46 +0200
committerJay Berkenbilt <ejb@ql.org>2022-09-23 23:27:18 +0200
commita085479ad9bd2a513018264a93db7aa8a27b8e06 (patch)
tree41ab8839247b446002ac2c1a4eb991e594b2fd55
parent9a9a7ab097ad8b6f3a1ab634d43ec20b85c98698 (diff)
downloadqpdf-a085479ad9bd2a513018264a93db7aa8a27b8e06.tar.zst
Run tests in CI with char as unsigned char
-rw-r--r--.github/workflows/main.yml7
-rwxr-xr-xbuild-scripts/test-unsigned-char18
2 files changed, 25 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 2bc5d217..e85d9d98 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -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
diff --git a/build-scripts/test-unsigned-char b/build-scripts/test-unsigned-char
new file mode 100755
index 00000000..840b517d
--- /dev/null
+++ b/build-scripts/test-unsigned-char
@@ -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