Compare commits

...

5 Commits

Author SHA1 Message Date
Asger Geel Weirsøe
e41ae1cd7f ci: use gitea-release-action@v1 for release upload
All checks were successful
Release / release (push) Successful in 5m23s
Test / test (push) Successful in 6m20s
Replaces the manual curl-based release creation with the standard action,
consistent with other Gitea repos. Also bumps checkout to @v4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 13:24:20 +02:00
Asger Geel Weirsøe
3e7bc18f65 fix: pass absolute path to pam_smoke_test via meson.current_build_dir()
All checks were successful
Test / test (push) Successful in 6m15s
dlopen with a bare filename searches LD_LIBRARY_PATH/ld.so cache, not the
build dir. Using the explicit absolute path avoids the lookup failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 13:13:51 +02:00
Asger Geel Weirsøe
1f927bdbb2 fix: run cargo test under xvfb-run; clean up unused imports and mut warning
Some checks failed
Test / test (push) Failing after 6m22s
ahfail_tests.rs calls on_activation which initialises GTK — needs a virtual
display in CI just like the Meson test step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 13:04:56 +02:00
Asger Geel Weirsøe
2c2e693193 ci: add libgstreamer-plugins-bad1.0-dev for gstreamer-player-1.0.pc
Some checks failed
Test / test (push) Failing after 2m57s
gstreamer-player-1.0.pc is shipped by the -bad dev package, not -base.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 12:59:54 +02:00
Asger Geel Weirsøe
9dbca0ec51 ci: install meson via apt instead of pip (PEP 668 / Ubuntu 24.04)
Some checks failed
Test / test (push) Failing after 1m35s
ubuntu-latest now resolves to Ubuntu 24.04 which ships meson 1.3.2 (satisfies
>=1.3.0) and enforces PEP 668, blocking pip3 install without --break-system-packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 12:57:30 +02:00
5 changed files with 19 additions and 31 deletions

View File

@@ -9,7 +9,7 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
@@ -18,12 +18,12 @@ jobs:
libgtk-3-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-good \
libpam0g-dev \
ninja-build \
python3-pip \
meson \
libglib2.0-dev
pip3 install meson
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
@@ -41,26 +41,13 @@ jobs:
cp builddir/ahfail-display dist/
tar czf ahfail-linux-x86_64.tar.gz -C dist .
- name: Create Gitea release and upload asset
- name: Upload release asset
# Requires a GITEA_TOKEN secret with write:repository scope.
# Create it in repo Settings → Secrets.
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_URL: https://gitea.weircon.dk
REPO: agw/gtk-ahfail
TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
RELEASE_ID=$(curl -f -X POST \
"${GITEA_URL}/api/v1/repos/${REPO}/releases" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"draft\":false}" \
| python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
[ -n "${RELEASE_ID}" ] || { echo "ERROR: empty RELEASE_ID from API"; exit 1; }
curl -f -X POST \
"${GITEA_URL}/api/v1/repos/${REPO}/releases/${RELEASE_ID}/assets" \
-H "Authorization: token ${GITEA_TOKEN}" \
-F "attachment=@ahfail-linux-x86_64.tar.gz"
uses: https://gitea.com/actions/gitea-release-action@v1
with:
token: ${{ secrets.GITEA_TOKEN }}
server_url: ${{ github.server_url }}
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
files: ahfail-linux-x86_64.tar.gz

View File

@@ -17,19 +17,19 @@ jobs:
libgtk-3-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-good \
libpam0g-dev \
ninja-build \
python3-pip \
meson \
libglib2.0-dev \
xvfb
pip3 install meson
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Run Rust tests
run: cargo test
run: xvfb-run cargo test
- name: Meson build
run: |

View File

@@ -241,7 +241,7 @@ fn run_test_09_idle_hide_cleanup() {
flush_events();
// Mock GtkLock struct
let mut windows_array = glib::ffi::g_array_new(0, 0, std::mem::size_of::<*mut Window>() as u32);
let windows_array = glib::ffi::g_array_new(0, 0, std::mem::size_of::<*mut Window>() as u32);
glib::ffi::g_array_append_vals(windows_array, &ctx_ptr as *const _ as *const c_void, 1);
let mut lock = GtkLock {

View File

@@ -1,5 +1,4 @@
use gtk::prelude::*;
use gtk::{gdk, gdk_pixbuf};
use gtk::gdk_pixbuf;
use gstreamer as gst;
use gstreamer_player as gst_player;
use std::time::Instant;

View File

@@ -91,4 +91,6 @@ pam_smoke = executable(
dependencies: [cc.find_library('dl', required: true)]
)
test('pam symbols', pam_smoke, args: [pam_cargo[0]])
test('pam symbols', pam_smoke,
args: [meson.current_build_dir() / 'libahfail_pam.so'],
depends: pam_cargo)