Commit a085479ad9bd2a513018264a93db7aa8a27b8e06

Authored by Jay Berkenbilt
1 parent 9a9a7ab0

Run tests in CI with char as unsigned char

.github/workflows/main.yml
@@ -130,3 +130,10 @@ jobs: @@ -130,3 +130,10 @@ jobs:
130 - uses: actions/checkout@v2 130 - uses: actions/checkout@v2
131 - name: 'Sanitizer Tests' 131 - name: 'Sanitizer Tests'
132 run: build-scripts/test-sanitizers 132 run: build-scripts/test-sanitizers
  133 + UnsignedChar:
  134 + runs-on: ubuntu-latest
  135 + needs: Prebuild
  136 + steps:
  137 + - uses: actions/checkout@v2
  138 + - name: 'Unsigned Char Tests'
  139 + run: build-scripts/test-unsigned-char
build-scripts/test-unsigned-char 0 → 100755
  1 +#!/bin/bash
  2 +set -e
  3 +sudo apt-get update
  4 +sudo apt-get -y install \
  5 + build-essential cmake \
  6 + zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
  7 +# Some platforms have unsigned-char by default, but Intel doesn't.
  8 +# This ensures that we catch code that would fail if char were
  9 +# unsigned by default.
  10 +env CFLAGS="-funsigned-char" \
  11 + CXXFLAGS="-funsigned-char" \
  12 + cmake -S . -B build \
  13 + -DCI_MODE=1 -DBUILD_STATIC_LIBS=0 -DCMAKE_BUILD_TYPE=Release \
  14 + -DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1 \
  15 + -DENABLE_QTC=1
  16 +cmake --build build -j$(nproc) -- -k
  17 +cd build
  18 +ctest --verbose