Skip to content

Migrating from 2021 edition to 2024 v3 #1248

Migrating from 2021 edition to 2024 v3

Migrating from 2021 edition to 2024 v3 #1248

Workflow file for this run

name: Rust
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
linux-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch
run: cargo fetch
- name: Build
run: RUSTFLAGS='-D warnings' cargo build --release --verbose
- name: Run tests
run: cargo test --release --verbose
- name: Run fmt check
run: cargo fmt --all -- --check
macos-homebrew:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: sfackler/actions/rustup@master
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
id: rust-version
- uses: actions/cache@v4
with:
path: ~/.cargo/registry/index
key: index-${{ runner.os }}-${{ github.run_number }}
restore-keys: |
index-${{ runner.os }}-
- run: cargo generate-lockfile
- uses: actions/cache@v4
with:
path: ~/.cargo/registry/cache
key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
- name: Fetch
run: cargo fetch
- name: Build
run: RUSTFLAGS='-D warnings' cargo build --release --verbose
- name: Run tests
run: cargo test --release --verbose