From 1156c1f927234694d918537d6d2b196c8663dfdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asger=20Geel=20Weirs=C3=B8e?= Date: Wed, 30 Sep 2026 19:19:09 +0200 Subject: [PATCH] Run CI and releases in an Arch container The locker needs gtk-session-lock, which Ubuntu does not package, and Arch is where the AUR package is built. The release tarball now carries the ahfail binary and its PAM file as well. Claude-Session: https://claude.ai/code/session_012LCTmU2ewo8tnM1dByYAoG --- .gitea/workflows/release.yml | 23 +++++++---------------- .gitea/workflows/test.yml | 23 ++++++----------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7fa22bc..947ffe7 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -8,25 +8,14 @@ on: jobs: release: runs-on: ubuntu-latest + # Built on Arch: the locker needs gtk-session-lock (not packaged by Ubuntu). + container: + image: archlinux:base-devel steps: - - uses: actions/checkout@v4 - - name: Install system dependencies - run: | - sudo apt-get update -q - sudo apt-get install -y \ - libgtk-3-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgstreamer-plugins-bad1.0-dev \ - gstreamer1.0-plugins-good \ - libpam0g-dev \ - ninja-build \ - meson \ - libglib2.0-dev + run: pacman -Syu --noconfirm --needed base-devel git nodejs rust meson ninja gtk3 gtk-session-lock gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad-libs pam curl - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v4 - name: Compute source tarball SHA256 run: | @@ -46,6 +35,8 @@ jobs: cp builddir/ahfail-module.so dist/ cp builddir/libahfail_pam.so dist/ cp builddir/ahfail-display dist/ + cp builddir/ahfail dist/ + cp data/pam.d/ahfail dist/ahfail.pam tar czf ahfail-linux-x86_64.tar.gz -C dist . - name: Upload release asset diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 6388aaf..103d902 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -7,26 +7,15 @@ on: jobs: test: runs-on: ubuntu-latest + # Arch, because the locker needs gtk-session-lock, which Ubuntu does not + # package; it is also the platform the AUR package is built on. + container: + image: archlinux:base-devel steps: - - uses: actions/checkout@v3 - - name: Install system dependencies - run: | - sudo apt-get update -q - sudo apt-get install -y \ - libgtk-3-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgstreamer-plugins-bad1.0-dev \ - gstreamer1.0-plugins-good \ - libpam0g-dev \ - ninja-build \ - meson \ - libglib2.0-dev \ - xvfb + run: pacman -Syu --noconfirm --needed base-devel git nodejs rust meson ninja gtk3 gtk-session-lock gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad-libs pam xorg-server-xvfb - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v4 - name: Run Rust tests run: xvfb-run cargo test