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..25a3a46d --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,46 @@ +name: compile + +on: [push, pull_request] + +jobs: + stable: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + release: + - "ubuntu:20.04" + - "ubuntu:22.04" + - "ubuntu:24.04" + - "debian:bullseye" + - "debian:bookworm" + - "debian:testing" + + steps: + - uses: actions/checkout@v4 + + # remove this when Ubuntu 24.04 is available on GitHub Actions + - name: Enable Ubuntu noble and update podman + run: | + echo 'deb http://archive.ubuntu.com/ubuntu/ noble main restricted universe' | sudo tee -a /etc/apt/sources.list.d/lunar.list + echo 'deb http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe' | sudo tee -a /etc/apt/sources.list.d/lunar.list + sudo apt-get update + DEBIAN_FRONTEND='noninteractive' sudo apt-get install -qy podman + podman version + + - name: Prepare ${{ matrix.release }} container for 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 cmake ninja-build + + - name: Configure + run: | + podman exec -i stable cmake -B build + + - name: Build + run: | + podman exec -i stable make -C build