From b19c574448f8caecc333588d25adf356446a52b9 Mon Sep 17 00:00:00 2001 From: astro Date: Thu, 26 Mar 2026 12:21:31 -0300 Subject: [PATCH 1/7] ci: run cargo tests on pull requests --- .github/workflows/tests.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..75f3b8d --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,31 @@ +name: Rust Tests + +on: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + pkg-config \ + libgtk-4-dev \ + libadwaita-1-dev + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Run tests + env: + PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig + run: cargo test From 35510633919daee1a43cf5fbeda55faa7466904e Mon Sep 17 00:00:00 2001 From: astro Date: Thu, 26 Mar 2026 12:28:06 -0300 Subject: [PATCH 2/7] fix(ci): run PR tests in Debian 13 container --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 75f3b8d..938b4c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,14 +10,16 @@ permissions: jobs: test: runs-on: ubuntu-24.04 + container: + image: debian:13 steps: - uses: actions/checkout@v4 - name: Install system dependencies run: | - sudo apt-get update - sudo apt-get install -y \ + apt-get update + apt-get install -y \ pkg-config \ libgtk-4-dev \ libadwaita-1-dev From a501190ee38db6ea53beb5a10b0f2763e86a6b95 Mon Sep 17 00:00:00 2001 From: astro Date: Thu, 26 Mar 2026 12:32:45 -0300 Subject: [PATCH 3/7] fix(ci): install curl in test container --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 938b4c7..9eafa62 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,6 +20,7 @@ jobs: run: | apt-get update apt-get install -y \ + curl \ pkg-config \ libgtk-4-dev \ libadwaita-1-dev From 4587dec1da2b02fc86ac9127f69d11e05b2d3196 Mon Sep 17 00:00:00 2001 From: astro Date: Thu, 26 Mar 2026 12:36:41 -0300 Subject: [PATCH 4/7] fix(ci): use ubuntu-latest and install compiler toolchain --- .github/workflows/appimage.yml | 2 +- .github/workflows/tests.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 7707fb8..9177fd4 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -10,7 +10,7 @@ permissions: jobs: build: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest container: image: debian:13 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9eafa62..4b9589f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ permissions: jobs: test: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest container: image: debian:13 @@ -20,6 +20,7 @@ jobs: run: | apt-get update apt-get install -y \ + build-essential \ curl \ pkg-config \ libgtk-4-dev \ From 3707a7f9f6549d164aa19811fd5b056b02e002c2 Mon Sep 17 00:00:00 2001 From: astro Date: Thu, 26 Mar 2026 12:44:37 -0300 Subject: [PATCH 5/7] fix(ci): use newer Debian image for GTK 4.20 tests --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4b9589f..c9d3ca1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: test: runs-on: ubuntu-latest container: - image: debian:13 + image: debian:unstable steps: - uses: actions/checkout@v4 From 4c721d12c9e8bc398a005e2405c53f1c6d2e6a4c Mon Sep 17 00:00:00 2001 From: astro Date: Thu, 26 Mar 2026 12:58:28 -0300 Subject: [PATCH 6/7] fix(ci): use ubuntu 26.04 test container and harden Proton parsing --- .github/workflows/tests.yml | 2 +- src/external/proton.rs | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c9d3ca1..733e84f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: test: runs-on: ubuntu-latest container: - image: debian:unstable + image: ubuntu:26.04 steps: - uses: actions/checkout@v4 diff --git a/src/external/proton.rs b/src/external/proton.rs index d798e68..7076f42 100644 --- a/src/external/proton.rs +++ b/src/external/proton.rs @@ -190,13 +190,19 @@ fn parse_proton_dir_name(name: &str) -> Option { // Try to parse "9.0", "8.0-4", "9.0-1" etc. let version_part = rest.split('-').next().unwrap_or(rest); let mut parts = version_part.split('.'); - let major: u32 = parts.next()?.trim().parse().ok()?; - let minor: u32 = parts - .next() - .and_then(|s| s.trim().parse().ok()) - .unwrap_or(0); - Some(ProtonVersion::Numbered(major, minor)) + if let Some(major_str) = parts.next() { + if let Ok(major) = major_str.trim().parse::() { + let minor: u32 = parts + .next() + .and_then(|s| s.trim().parse().ok()) + .unwrap_or(0); + + return Some(ProtonVersion::Numbered(major, minor)); + } + } + + Some(ProtonVersion::Other(name.to_string())) } #[cfg(test)] From 87e5116bbd56125f7df435f3ee1d2415dccdc072 Mon Sep 17 00:00:00 2001 From: astro Date: Thu, 26 Mar 2026 13:04:41 -0300 Subject: [PATCH 7/7] chore(ci): use rust-toolchain action in appimage workflow --- .github/workflows/appimage.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 9177fd4..93e2c6b 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -33,9 +33,7 @@ jobs: wget unzip file libfuse2 curl git glslc libdrm-dev sudo gh - name: Install Rust - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --quiet - echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + uses: dtolnay/rust-toolchain@stable - name: Build AppImage run: bash build-aux/appimage/build-appimage.sh