name: rust
concurrency:
cancel-in-progress: false
group: ${{ github.workflow }}-${{ github.ref }}
env:
CARGO_TERM_COLOR: always
on:
release:
types: [ created ]
repository_dispatch:
types: [ rust ]
schedule:
- cron: "30 21 * * 0" workflow_dispatch:
permissions: write-all
jobs:
workspace:
name: Workspace
strategy:
matrix:
platform: [ ubuntu-latest, ]
target: [ x86_64-unknown-linux-gnu, ]
toolchain: [ stable, ]
runs-on: ${{ matrix.platform }}
steps:
-
name: checkout
uses: actions/checkout@v4
-
name: rustup
run: |
rustup default ${{ matrix.toolchain }}
rustup target add ${{ matrix.target }}
rustup update
-
name: build
run: cargo build --all-features -r -v --workspace
-
name: test
run: cargo test --all-features -v --workspace
-
name: cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-cargo-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/registry
~/.cargo/git
target/debug
target/release
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-${{ matrix.toolchain }}-
${{ runner.os }}-cargo-
${{ runner.os }}-