Add -C option to overwrite config file parameters #2011
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
name: tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/rauc/rauc/rauc-ci:latest | |
# allow mounting and devtmpfs in the container | |
options: --user=root --privileged -v /dev:/dev | |
steps: | |
- name: Inspect environment | |
run: | | |
whoami | |
gcc --version | |
ls -l /dev/kvm || true | |
- uses: actions/checkout@v4 | |
- name: Test with service and gpt | |
run: | | |
rm -rf build/ | |
meson setup -Dservice=true -Dgpt=enabled -Db_coverage=true -Dwerror=true build | |
meson configure build | |
meson compile -C build | |
./qemu-test | |
lcov --directory . --capture --output-file "service.info" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: service.info | |
flags: "service=true" | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
- name: Test without service and gpt | |
run: | | |
rm -rf build/ | |
meson setup -Dservice=false -Dgpt=enabled -Db_coverage=true -Dwerror=true build | |
meson configure build | |
meson compile -C build | |
./qemu-test | |
lcov --directory . --capture --output-file "noservice.info" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: noservice.info | |
flags: "service=false" | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
- name: Test fuzzers | |
run: | | |
rm -rf build/ | |
meson setup -Dservice=false -Dwerror=true -Dfuzzing=true -Db_lundef=false -Db_sanitize=address build | |
meson configure build | |
meson compile -C build | |
meson test -C build --suite rauc:fuzzing | |
- name: Build documentation | |
run: | | |
rm -rf build/ | |
meson setup -Dtests=false -Dhtmldocs=true build | |
meson configure build | |
meson compile -C build | |
- name: Build CGI example | |
run: | | |
cd contrib/cgi | |
./autogen.sh | |
./configure CFLAGS=-Werror | |
make clean | |
make -j4 | |
make -j4 distcheck | |
- name: Show system status | |
if: ${{ failure() }} | |
run: | | |
dmesg | tail -n 100 | |
mount || true | |
losetup || true | |
dmsetup table || true | |
dmsetup targets || true | |
- name: Show logs | |
if: ${{ failure() }} | |
run: | | |
cat build/meson-logs/testlog.txt || true | |
dmesg | tail -n 100 | |
cross: | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
architecture: | |
- "arm/v5" | |
- "arm/v7" | |
- "arm64/v8" | |
- "386" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install QEMU | |
run: | | |
sudo apt-get update | |
DEBIAN_FRONTEND='noninteractive' sudo apt-get install -qy qemu-user-static | |
- name: Prepare ${{ matrix.architecture }} container | |
run: | | |
podman run --name cross -di --platform linux/${{ matrix.architecture }} --userns=keep-id:uid=1000,gid=1000 -v "$PWD":/home -w /home ghcr.io/rauc/rauc/rauc-ci:latest bash | |
podman logs cross | |
podman exec -i cross uname -a | |
podman exec -i cross id | |
- name: Build | |
run: | | |
podman exec -i cross meson setup -Dgpt=enabled -Dwerror=true build | |
podman exec -i cross meson compile -C build | |
- name: Test | |
run: | | |
podman exec -i cross meson test -C build --timeout-multiplier 3 | |
- name: Show logs | |
if: ${{ failure() }} | |
run: | | |
cat build/meson-logs/testlog.txt || true | |
stable: | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
release: | |
- "ubuntu:20.04" | |
- "ubuntu:22.04" | |
- "ubuntu:24.04" | |
- "debian:bullseye" | |
- "debian:testing" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare ${{ matrix.release }} container for meson build | |
run: | | |
podman version | |
podman run --name stable -di --userns=keep-id:uid=1000,gid=1000 -v "$PWD":/home -w /home ${{ matrix.release }} bash | |
podman exec -i stable uname -a | |
podman exec -i stable id | |
podman exec -i -u root stable apt-get update | |
podman exec -e DEBIAN_FRONTEND='noninteractive' -i -u root stable apt-get install -qy build-essential meson libtool libglib2.0-dev libcurl3-dev libssl-dev libjson-glib-dev libdbus-1-dev libfdisk-dev libnl-genl-3-dev squashfs-tools | |
- name: Patch & prepare | |
run: | | |
podman exec -i stable find .github/workflows/patches/${{ matrix.release }}/ -type f -name "*.patch" -print0 | sort -z | xargs -t -n 1 -r -0 patch -p1 -f -i | |
- name: Configure | |
run: | | |
podman exec -i stable meson setup -Dgpt=disabled -Dwerror=true build | |
- name: Build | |
run: | | |
podman exec -i stable ninja -C build | |
- name: Show logs | |
if: ${{ failure() }} | |
run: | | |
cat build/meson-logs/testlog.txt || true | |
cat config.log || true | |
cat test/*.log || true | |
cat test-suite.log || true | |
cat rauc-*/_build/sub/test-suite.log || true |