Skip to content

rust

rust #13

Workflow file for this run

name: rust
concurrency:
cancel-in-progress: false
group: ${{ github.workflow }}-${{ github.ref }}
env:
CARGO_TERM_COLOR: always
on:
push:
branches: [ main ]
release:
types: [ created ]
repository_dispatch:
types: [ rust ]
schedule:
- cron: "30 21 * * 0" # Every Sunday at 9:30pm UTC
workflow_dispatch:
permissions: write-all
jobs:
workspace:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ ubuntu-latest ] # [ ubuntu-latest, macos-latest, windows-latest ]
toolchain: [ stable, nightly ]
steps:
- uses: actions/checkout@v4
-
name: rustup
run: |
rustup default ${{ matrix.toolchain }}
rustup update
-
name: build
run: cargo build --all-features -r -v --workspace
-
name: test
run: cargo test --all-features -v --workspace
-
name: bench (workspace)
if: matrix.toolchain == 'nightly'
run: cargo bench -F full -v --workspace
-
name: cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/registry
~/.cargo/git
target
restore-keys: |
${{ runner.os }}-cargo-
${{ runner.os }}-