-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Rust POC #2689
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
Rust POC #2689
Changes from all commits
4523ca5
b94203c
919d31d
3c16c0d
7307776
a31eebb
180dd5c
5ce194f
0801662
10a2461
959fa3a
3e81d25
f4b6669
5d0e24d
2d48c27
7ded723
4edac90
cee05fc
d7c4d99
fbafe78
9041469
56abfff
980345a
5ccf4a0
828da8c
293332f
9b24254
7966c60
d680ce9
8d95f64
b28d4c6
8d2d38d
b103e7b
f373923
0ef4d2c
fa54e5b
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 |
|---|---|---|
| @@ -0,0 +1,174 @@ | ||
| name: Rust CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["master", "v**"] | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: rust-ci-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| RUST_BACKTRACE: 1 | ||
|
|
||
| jobs: | ||
| # Run tests on multiple platforms | ||
| test: | ||
| name: Test - ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'Rust CI' step
Uses Step Error loading related location Loading |
||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/registry | ||
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Cache cargo index | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/git | ||
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Cache cargo build | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: rust/target | ||
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Build | ||
| working-directory: ./rust | ||
| run: cargo build --verbose | ||
|
|
||
| - name: Run tests | ||
| working-directory: ./rust | ||
| run: cargo test --verbose | ||
|
|
||
| # Linting with clippy | ||
|
Comment on lines
+19
to
+67
Check warningCode scanning / zizmor overly broad permissions Warning
overly broad permissions
|
||
| clippy: | ||
|
Comment on lines
+20
to
+68
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
||
| name: Clippy (linting) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
Check failureCode scanning / zizmor unpinned action reference Error
unpinned action reference
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'Rust CI' step
Uses Step Error loading related location Loading |
||
| with: | ||
| components: clippy | ||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/registry | ||
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Cache cargo index | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/git | ||
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Cache cargo build | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: rust/target | ||
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Run clippy | ||
| working-directory: ./rust | ||
| run: cargo clippy --all-targets --all-features -- -D warnings | ||
|
|
||
| # Formatting check | ||
|
Comment on lines
+68
to
+110
Check warningCode scanning / zizmor overly broad permissions Warning
overly broad permissions
|
||
| fmt: | ||
|
Comment on lines
+69
to
+111
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
||
| name: Rustfmt (formatting) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
Check failureCode scanning / zizmor unpinned action reference Error
unpinned action reference
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'Rust CI' step
Uses Step Error loading related location Loading |
||
| with: | ||
| components: rustfmt | ||
|
|
||
| - name: Check formatting | ||
| working-directory: ./rust | ||
| run: cargo fmt --all -- --check | ||
|
|
||
| # Build in release mode to ensure optimized builds work | ||
|
Comment on lines
+111
to
+135
Check warningCode scanning / zizmor overly broad permissions Warning
overly broad permissions
|
||
| build-release: | ||
|
Comment on lines
+112
to
+136
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
||
| name: Build (release mode) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
Check failureCode scanning / zizmor unpinned action reference Error
unpinned action reference
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'Rust CI' step
Uses Step Error loading related location Loading |
||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/registry | ||
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Cache cargo index | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/git | ||
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Cache cargo build | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: rust/target | ||
| key: ${{ runner.os }}-cargo-build-target-release-${{ hashFiles('**/Cargo.lock') }} | ||
|
|
||
| - name: Build release | ||
| working-directory: ./rust | ||
| run: cargo build --release --verbose | ||
|
Comment on lines
+137
to
+174
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
||
Check failure
Code scanning / zizmor
unpinned action reference Error