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
22 changes: 22 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Rust

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run check
run: CARGO_BUILD_RUSTFLAGS='-D warnings' cargo check --verbose
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

Consider using RUSTFLAGS environment variable instead of CARGO_BUILD_RUSTFLAGS for broader compatibility. RUSTFLAGS is the standard way to pass flags to rustc and works consistently across different cargo commands.

Suggested change
run: CARGO_BUILD_RUSTFLAGS='-D warnings' cargo check --verbose
run: RUSTFLAGS='-D warnings' cargo check --verbose

Copilot uses AI. Check for mistakes.
- name: Build
run: cargo build --verbose
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The build step should also use the same RUSTFLAGS='-D warnings' to ensure consistency between check and build phases. This prevents warnings from being introduced that pass check but would fail in a production build with warnings as errors.

Suggested change
run: cargo build --verbose
run: CARGO_BUILD_RUSTFLAGS='-D warnings' cargo build --verbose

Copilot uses AI. Check for mistakes.
Loading