-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
183 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
env: | ||
BUILD: check | ||
HOST: | ||
MAKEFLAGS: -j4 | ||
BENCH: yes | ||
TESTRUNS: | ||
EXEC_CMD: | ||
|
||
cat_logs_snippet: &CAT_LOGS | ||
on_failure: | ||
cat_config_log_script: | ||
- cat config.log || true | ||
cat_test_env_script: | ||
- cat test_env.log || true | ||
cat_ci_env_script: | ||
- env | ||
|
||
merge_base_script_snippet: &MERGE_BASE | ||
merge_base_script: | ||
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi | ||
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH | ||
- git config --global user.email "ci@ci.ci" | ||
- git config --global user.name "ci" | ||
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts | ||
|
||
task: | ||
name: "x86_64: Linux (Debian stable)" | ||
container: | ||
dockerfile: ci/linux-debian.Dockerfile | ||
memory: 2G | ||
cpu: 4 | ||
matrix: &ENV_MATRIX | ||
- env: | ||
- env: | ||
BUILD: distcheck | ||
- env: | ||
CFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer" | ||
LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer" | ||
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1" | ||
BENCH: no | ||
- env: | ||
EXEC_CMD: valgrind --error-exitcode=42 | ||
TESTRUNS: 1 | ||
BUILD: | ||
matrix: | ||
- env: | ||
CC: gcc | ||
- env: | ||
CC: clang | ||
<< : *MERGE_BASE | ||
test_script: | ||
- ./ci/cirrus.sh | ||
<< : *CAT_LOGS | ||
|
||
task: | ||
name: "i686: Linux (Debian stable)" | ||
container: | ||
dockerfile: ci/linux-debian.Dockerfile | ||
memory: 2G | ||
cpu: 4 | ||
env: | ||
HOST: i686-linux-gnu | ||
matrix: | ||
- env: | ||
CC: i686-linux-gnu-gcc | ||
- env: | ||
CC: clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include | ||
test_script: | ||
- ./ci/cirrus.sh | ||
<< : *CAT_LOGS | ||
|
||
task: | ||
name: "x86_64: macOS Catalina" | ||
macos_instance: | ||
image: catalina-base | ||
env: | ||
# Cirrus gives us a fixed number of 12 virtual CPUs. | ||
MAKEFLAGS: -j13 | ||
matrix: | ||
- env: {} | ||
- env: {BUILD: distcheck} | ||
- env: | ||
CFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer" | ||
LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer" | ||
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1" | ||
matrix: | ||
- env: | ||
CC: gcc-9 | ||
- env: | ||
CC: clang | ||
brew_script: | ||
- brew install automake libtool gcc@9 | ||
<< : *MERGE_BASE | ||
test_script: | ||
- ./ci/cirrus.sh | ||
<< : *CAT_LOGS | ||
|
||
task: | ||
name: "s390x (big-endian): Linux (Debian stable, QEMU)" | ||
container: | ||
dockerfile: ci/linux-debian.Dockerfile | ||
cpu: 4 | ||
memory: 2G | ||
env: | ||
EXEC_CMD: qemu-s390x -L /usr/s390x-linux-gnu | ||
HOST: s390x-linux-gnu | ||
BUILD: | ||
<< : *MERGE_BASE | ||
test_script: | ||
# https://sourceware.org/bugzilla/show_bug.cgi?id=27008 | ||
- rm /etc/ld.so.cache | ||
- ./ci/cirrus.sh | ||
<< : *CAT_LOGS | ||
|
||
task: | ||
name: "x86_64-w64-mingw32: Linux (Debian stable, Wine)" | ||
container: | ||
dockerfile: ci/linux-debian.Dockerfile | ||
cpu: 4 | ||
memory: 2G | ||
env: | ||
EXEC_CMD: wine | ||
HOST: x86_64-w64-mingw32 | ||
CXXFLAGS: -O2 -static -static-libgcc -static-libstdc++ | ||
BUILD: | ||
<< : *MERGE_BASE | ||
test_script: | ||
- ./ci/cirrus.sh | ||
<< : *CAT_LOGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
set -x | ||
|
||
export LC_ALL=C | ||
|
||
env >> test_env.log | ||
|
||
$CC -v || true | ||
valgrind --version || true | ||
|
||
./autogen.sh | ||
|
||
./configure --host="$HOST" --enable-benchmark="$BENCH" | ||
|
||
# We have set "-j<n>" in MAKEFLAGS. | ||
make | ||
|
||
# Print information about binaries so that we can see that the architecture is correct | ||
file test* || true | ||
file bench* || true | ||
file .libs/* || true | ||
|
||
if [ -n "$BUILD" ] | ||
then | ||
make "$BUILD" | ||
fi | ||
|
||
if [ -n "$EXEC_CMD" ]; then | ||
$EXEC_CMD ./test $TESTRUNS | ||
$EXEC_CMD ./test-verify $TESTRUNS | ||
fi | ||
|
||
if [ "$BENCH" = "yes" ]; then | ||
$EXEC_CMD ./bench | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM debian:stable | ||
|
||
RUN dpkg --add-architecture i386 | ||
RUN dpkg --add-architecture s390x | ||
RUN apt-get update | ||
|
||
# dkpg-dev: to make pkg-config work in cross-builds | ||
RUN apt-get install --no-install-recommends --no-upgrade -y \ | ||
git ca-certificates \ | ||
make automake libtool pkg-config dpkg-dev valgrind qemu-user \ | ||
gcc g++ clang libc6-dbg \ | ||
gcc-i686-linux-gnu g++-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 \ | ||
g++-s390x-linux-gnu gcc-s390x-linux-gnu libc6-dev-s390x-cross libc6-dbg:s390x \ | ||
wine g++-mingw-w64-x86-64 | ||
|
||
# Run a dummy command in wine to make it set up configuration | ||
RUN wine true || true |