Skip to content

chore(CI): run tests on CentOS 7 #937

chore(CI): run tests on CentOS 7

chore(CI): run tests on CentOS 7 #937

Workflow file for this run

name: "CI"
on:
pull_request:
push:
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: shellcheck tests/*.sh
nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- run: nix-build -A hydraJobs.release
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get toolchain version
run: |
c++ --version
ld --version
autoconf --version
- run: |
./bootstrap.sh
mkdir build && cd build
../configure --with-asan --with-ubsan
make -j$(nproc) check
glibc:
strategy:
fail-fast: false
matrix:
glibc: ["2_17", "2_27", "2_28", "2_31", "2_34", "2_35", "2_39"]
platform: ["x86_64", "ppc64le", "aarch64", "s390x"]
include:
- glibc: "2_17"
platform: "i686"
- glibc: "2_27"
platform: "i686"
- glibc: "2_27"
platform: "armv7l"
- glibc: "2_31"
platform: "armv7l"
- glibc: "2_35"
platform: "armv7l"
- glibc: "2_39"
platform: "armv7l"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
if: matrix.platform != 'x86_64'
uses: docker/setup-qemu-action@v3
- run: |
cat <<EOF > build.sh
set -e
set -x
if [ "${{ matrix.glibc }}" == "2_27" ]; then
apt-get update
apt-get -y install software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
apt-get -y install automake g++-11 make
update-alternatives --install /usr/bin/c++ c++ $(which g++-11) 100
update-alternatives --install /usr/bin/cc cc $(which gcc-11) 100
elif [ "${{ matrix.glibc }}" == "2_31" ] || [ "${{ matrix.glibc }}" == "2_35" ] || [ "${{ matrix.glibc }}" == "2_39" ]; then
apt-get update
apt-get -y install automake g++ make
fi
c++ --version
ld --version
autoconf --version
./bootstrap.sh
mkdir build && cd build
../configure
make -j$(nproc) check || (cat tests/test-suite.log; exit 1)
EOF
if [ "${{ matrix.platform }}" == "x86_64" ]; then
DOCKER_PLATFORM=amd64
elif [ "${{ matrix.platform }}" == "i686" ]; then
DOCKER_PLATFORM=386
elif [ "${{ matrix.platform }}" == "aarch64" ]; then
DOCKER_PLATFORM=arm64/v8
elif [ "${{ matrix.platform }}" == "armv7l" ]; then
DOCKER_PLATFORM=arm/v7
else
DOCKER_PLATFORM=${{ matrix.platform }}
fi
if [ "${{ matrix.glibc }}" == "2_17" ]; then
IMAGE=quay.io/pypa/manylinux2014_${{ matrix.platform }}:latest
elif [ "${{ matrix.glibc }}" == "2_27" ]; then
IMAGE=ubuntu:18.04
elif [ "${{ matrix.glibc }}" == "2_28" ]; then
IMAGE=quay.io/pypa/manylinux_${{ matrix.glibc }}_${{ matrix.platform }}:latest
elif [ "${{ matrix.glibc }}" == "2_31" ]; then
IMAGE=ubuntu:20.04
elif [ "${{ matrix.glibc }}" == "2_34" ]; then
IMAGE=quay.io/pypa/manylinux_${{ matrix.glibc }}_${{ matrix.platform }}:latest
elif [ "${{ matrix.glibc }}" == "2_35" ]; then
IMAGE=ubuntu:22.04
elif [ "${{ matrix.glibc }}" == "2_39" ]; then
IMAGE=ubuntu:24.04
else
exit 1
fi
docker run --platform linux/${DOCKER_PLATFORM} -v $(pwd):/gha ${IMAGE} sh -ec "cd /gha && bash ./build.sh"