From 0b95e57a8dd69a38506e1a97bb3b1a6df8c2946d Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Tue, 28 May 2024 08:27:53 +0200 Subject: [PATCH] github-actions: replace autotools by cmake --- .github/workflows/autotools.yml | 19 --------------- .github/workflows/compile.yml | 42 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/autotools.yml create mode 100644 .github/workflows/compile.yml diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml deleted file mode 100644 index 53110306..00000000 --- a/.github/workflows/autotools.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: C with autotools - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: autogen - run: ./autogen.sh - - name: configure - run: ./configure - - name: make - run: make - - name: make distcheck - run: make distcheck diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 00000000..b77a8ff0 --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,42 @@ +name: compile + +on: [push, pull_request] + +jobs: + stable: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + release: + - "ubuntu:20.04" + - "ubuntu:22.04" + - "ubuntu:24.04" + - "debian:oldstable" + - "debian:stable" + - "debian:testing" + - "debian:unstable" + + steps: + - uses: actions/checkout@v4 + + - name: Prepare ${{ matrix.release }} container + 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 gcc clang cmake ninja-build + + - name: Configure & Build with gcc + run: | + podman exec -i stable rm -rf build + podman exec -i stable cmake -DCMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=gcc -B build + podman exec -i stable cmake --build build + + - name: Configure & Build with clang + run: | + podman exec -i stable rm -rf build + podman exec -i stable cmake -DCMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=clang -B build + podman exec -i stable cmake --build build