-
Notifications
You must be signed in to change notification settings - Fork 0
build: validate PRs and mirror release matrix in CI #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
| - 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
|
||
| - 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 | ||
There was a problem hiding this comment.
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-inrust-toolchain.tomland a setup action).There was a problem hiding this comment.
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@stableinstead of pipingsh.rustup.rsintosh. No more unpinned external script at runtime.