Skip to content

Commit

Permalink
Refactor CI workflow to enhance build and test processes with multipl…
Browse files Browse the repository at this point in the history
…e toolchains and improved dependency management
  • Loading branch information
baget committed Feb 1, 2025
1 parent 9d7b598 commit eaba3bf
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,46 @@
name: Rust CI

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

env:
CARGO_TERM_COLOR: always

permissions:
contents: read
pull-requests: write

jobs:
build:
build_and_test:
name: Build Rust - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- name: Update rust and set default toolchain
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

latest_deps:
name: Latest Dependencies
runs-on: ubuntu-latest
continue-on-error: true
env:
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: allow
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: cargo update --verbose
- run: cargo build --verbose
- run: cargo test --verbose

0 comments on commit eaba3bf

Please sign in to comment.