Use Dockerfiles in cross testing github workflows

Synchronizes environment setup for github workflows to what is
defined in the development Dockerfiles. So they don't need to
be maintained separately.
This commit is contained in:
Roland Reichwein 2026-04-13 11:27:15 +02:00
parent ad3830d8a0
commit e165be6a5c
5 changed files with 50 additions and 173 deletions

View File

@ -11,39 +11,19 @@ jobs:
build-gcc-cpp23-linux-no-stl-armhf:
name: GCC C++23 Linux - No STL - armhf
runs-on: ubuntu-24.04
container:
image: debian:trixie
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
dpkg --add-architecture armhf
apt-get update
apt-get install -y \
binfmt-support \
build-essential \
cmake \
make \
ninja-build \
git \
wget \
file \
gcc-arm-linux-gnueabihf \
g++-arm-linux-gnueabihf \
libc6:armhf \
libstdc++6:armhf \
qemu-user-static \
qemu-user
- name: Build Docker image
run: docker build -t etl-armhf -f .devcontainer/armhf/Dockerfile .
- name: Build
- name: Build and run tests
run: |
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/armhf/toolchain-armhf.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./
cmake --build . -- -j "$(getconf _NPROCESSORS_ONLN)"
- name: Run tests
run: ctest -V
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-armhf bash -c "\
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/armhf/toolchain-armhf.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./ && \
cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \
ctest -V"

View File

@ -11,39 +11,19 @@ jobs:
build-gcc-cpp23-linux-no-stl-i386:
name: GCC C++23 Linux - No STL - i386
runs-on: ubuntu-24.04
container:
image: debian:trixie
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
dpkg --add-architecture i386
apt-get update
apt-get install -y \
binfmt-support \
build-essential \
cmake \
make \
ninja-build \
git \
wget \
file \
gcc-i686-linux-gnu \
g++-i686-linux-gnu \
libc6:i386 \
libstdc++6:i386 \
qemu-user-static \
qemu-user
- name: Build Docker image
run: docker build -t etl-i386 -f .devcontainer/i386/Dockerfile .
- name: Build
- name: Build and run tests
run: |
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/i386/toolchain-i386.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./
cmake --build . -- -j "$(getconf _NPROCESSORS_ONLN)"
- name: Run tests
run: ctest -V
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-i386 bash -c "\
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/i386/toolchain-i386.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./ && \
cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \
ctest -V"

View File

@ -11,62 +11,19 @@ jobs:
build-gcc-cpp23-linux-no-stl-powerpc:
name: GCC C++23 Linux - No STL - powerpc
runs-on: ubuntu-24.04
container:
image: debian:sid-20260406
steps:
- uses: actions/checkout@v4
- name: Install base dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
dpkg --add-architecture powerpc
apt-get update
apt-get install -y --no-install-recommends \
binfmt-support \
gpg \
ca-certificates \
cmake \
make \
ninja-build \
git \
wget \
file \
debian-ports-archive-keyring
- name: Build Docker image
run: docker build -t etl-powerpc -f .devcontainer/powerpc/Dockerfile .
- name: Configure powerpc apt sources
- name: Build and run tests
run: |
printf '%s\n' \
'Types: deb' \
'URIs: http://snapshot.debian.org/archive/debian-ports/20260406T000000Z' \
'Suites: sid' \
'Components: main' \
'Architectures: powerpc' \
'Signed-By: /usr/share/keyrings/debian-ports-archive-keyring.gpg' \
> /etc/apt/sources.list.d/powerpc.sources
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid
- name: Install cross-compilation tools
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get install -y --no-install-recommends \
qemu-user-static \
qemu-user \
gcc-powerpc-linux-gnu \
g++-powerpc-linux-gnu \
libc6:powerpc \
libstdc++6:powerpc
- name: Build
run: |
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/powerpc/toolchain-powerpc.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./
cmake --build . -- -j "$(getconf _NPROCESSORS_ONLN)"
- name: Run tests
run: ctest -V
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-powerpc bash -c "\
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/powerpc/toolchain-powerpc.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./ && \
cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \
ctest -V"

View File

@ -11,39 +11,19 @@ jobs:
build-gcc-cpp23-linux-no-stl-riscv64:
name: GCC C++23 Linux - No STL - riscv64
runs-on: ubuntu-24.04
container:
image: debian:trixie
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
dpkg --add-architecture riscv64
apt-get update
apt-get install -y \
binfmt-support \
build-essential \
cmake \
make \
ninja-build \
git \
wget \
file \
gcc-riscv64-linux-gnu \
g++-riscv64-linux-gnu \
libc6:riscv64 \
libstdc++6:riscv64 \
qemu-user-static \
qemu-user
- name: Build Docker image
run: docker build -t etl-riscv64 -f .devcontainer/riscv64/Dockerfile .
- name: Build
- name: Build and run tests
run: |
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/riscv64/toolchain-riscv64.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./
cmake --build . -- -j "$(getconf _NPROCESSORS_ONLN)"
- name: Run tests
run: ctest -V
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-riscv64 bash -c "\
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/riscv64/toolchain-riscv64.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./ && \
cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \
ctest -V"

View File

@ -11,39 +11,19 @@ jobs:
build-gcc-cpp23-linux-no-stl-s390x:
name: GCC C++23 Linux - No STL - s390x
runs-on: ubuntu-24.04
container:
image: debian:trixie
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
dpkg --add-architecture s390x
apt-get update
apt-get install -y \
binfmt-support \
build-essential \
cmake \
make \
ninja-build \
git \
wget \
file \
gcc-s390x-linux-gnu \
g++-s390x-linux-gnu \
libc6:s390x \
libstdc++6:s390x \
qemu-user-static \
qemu-user
- name: Build Docker image
run: docker build -t etl-s390x -f .devcontainer/s390x/Dockerfile .
- name: Build
- name: Build and run tests
run: |
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/s390x/toolchain-s390x.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./
cmake --build . -- -j "$(getconf _NPROCESSORS_ONLN)"
- name: Run tests
run: ctest -V
docker run --rm --user root -v ${{ github.workspace }}:/workspaces/etl etl-s390x bash -c "\
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF \
-DETL_CXX_STANDARD=23 -DCMAKE_TOOLCHAIN_FILE=.devcontainer/s390x/toolchain-s390x.cmake \
-DEXTRA_TESTING_FLAGS=-v \
./ && \
cmake --build . -- -j \$(getconf _NPROCESSORS_ONLN) && \
ctest -V"