From a8ce451994e3767bfef49f18c6ca67f44e9b2472 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 3 Jun 2024 17:00:18 +0100 Subject: [PATCH] Use pre-canned Fedora 40 and Debian unstable CI targets Signed-off-by: Richard Hughes --- .github/workflows/ci.yml | 41 +++++++++++++++++++++++----------------- ci/Dockerfile-debian | 4 ++++ ci/Dockerfile-fedora | 3 +++ ci/build-debian.sh | 1 + ci/build-fedora.sh | 10 ++++++++++ 5 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 ci/Dockerfile-debian create mode 100644 ci/Dockerfile-fedora create mode 120000 ci/build-debian.sh create mode 100755 ci/build-fedora.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 508b8e0..70a6164 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,24 @@ -{ - "name": "pull-request", - "on": { - "push": { "branches": "main" }, - "pull_request": { "branches": "main" }, - }, - "jobs": { - "linux": { - "runs-on": "ubuntu-latest", - "container": "vathpela/efi-ci:f36-x64", - "steps": [ - { "uses": "actions/checkout@v2" }, - { "run": "meson build && ninja -C build" }, - ], - }, - }, -} +name: Build and Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +permissions: + contents: read + +jobs: + build-linux: + runs-on: ubuntu-latest + strategy: + matrix: + distro: + - fedora + - debian + fail-fast: false + steps: + - uses: actions/checkout@v4 + - run: docker build -t efibootmgr-${{ matrix.distro }} -f ci/Dockerfile-${{ matrix.distro }} . + - run: docker run -t -v `pwd`:/build efibootmgr-${{ matrix.distro }} ./ci/build-${{ matrix.distro }}.sh diff --git a/ci/Dockerfile-debian b/ci/Dockerfile-debian new file mode 100644 index 0000000..05b58d5 --- /dev/null +++ b/ci/Dockerfile-debian @@ -0,0 +1,4 @@ +FROM debian:unstable +RUN apt-get update -qq +RUN apt-get install -yq --no-install-recommends meson ninja-build pkg-config gcc libefivar-dev libpopt-dev +WORKDIR /build diff --git a/ci/Dockerfile-fedora b/ci/Dockerfile-fedora new file mode 100644 index 0000000..2870583 --- /dev/null +++ b/ci/Dockerfile-fedora @@ -0,0 +1,3 @@ +FROM fedora:40 +RUN dnf -y install meson gcc redhat-rpm-config efivar-devel popt-devel +WORKDIR /build diff --git a/ci/build-debian.sh b/ci/build-debian.sh new file mode 120000 index 0000000..a03d22e --- /dev/null +++ b/ci/build-debian.sh @@ -0,0 +1 @@ +build-fedora.sh \ No newline at end of file diff --git a/ci/build-fedora.sh b/ci/build-fedora.sh new file mode 100755 index 0000000..20d94ff --- /dev/null +++ b/ci/build-fedora.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +export LC_ALL=C.UTF-8 +mkdir -p build && cd build +rm -rf * +meson .. +ninja -v || bash +ninja test -v +DESTDIR=/tmp/install-ninja ninja install +cd ..