Skip to content
Merged
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
45 changes: 39 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,52 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
name: "C.I"
runs-on: ubuntu-latest
build:
name: "Build (${{matrix.os}})"
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4

- name: Install packages
run: sudo apt install libatk1.0-dev pkg-config libgtk-3-dev libudev-dev
run: |
sudo apt-get update
sudo apt-get install -y libatk1.0-dev pkg-config libgtk-3-dev libudev-dev

- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
uses: dtolnay/rust-toolchain@stable

Comment on lines 28 to 30
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Piping a remote script into sh (curl ... | sh) makes the CI environment dependent on an unpinned external script at runtime. For better supply-chain security and reproducibility, consider using a dedicated action to install Rust (or pin the toolchain via a checked-in rust-toolchain.toml and a setup action).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0384285 — both jobs now use dtolnay/rust-toolchain@stable instead of piping sh.rustup.rs into sh. No more unpinned external script at runtime.

- name: Build ubuntu version
- name: Build
run: cargo build --release --locked

lint:
name: "Lint (informational)"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y libatk1.0-dev pkg-config libgtk-3-dev libudev-dev

Comment on lines +40 to +44
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This apt install step may block on an interactive confirmation prompt and can fail on runners without an updated package index. In CI it's more reliable to run an update first and install with -y (and usually prefer apt-get for scripting). Consider applying the same pattern to the build job as well.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0384285 — both jobs now run apt-get update followed by apt-get install -y … so they refresh the index and never block on a prompt.

- name: Install Rust + clippy + rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: cargo fmt --check
continue-on-error: true
run: cargo fmt --all -- --check

- name: cargo clippy
continue-on-error: true
run: cargo clippy --release --locked --all-targets
Loading