Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
build:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
container:
image: debian:13

Expand All @@ -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
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Rust Tests

on:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
container:
image: ubuntu:26.04

steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
apt-get update
apt-get install -y \
build-essential \
curl \
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
18 changes: 12 additions & 6 deletions src/external/proton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,19 @@ fn parse_proton_dir_name(name: &str) -> Option<ProtonVersion> {
// 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::<u32>() {
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)]
Expand Down
Loading