mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-16 05:20:22 +08:00
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.9.1 to 2.9.2. - [Release notes](https://github.com/swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](https://github.com/swatinem/rust-cache/compare/c19371144df3bb44fab255c43d04cbc2ab54d1c4...6323deb102c322ba6fcbdcafc7e3dddab59af2b6) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-version: 2.9.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
name: Rust Cache Seed
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: "0"
|
|
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
SCCACHE_GHA_ENABLED: "true"
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
rust:
|
|
name: Rust (${{ matrix.runner }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
runner: [linux-amd64-cpu8, linux-arm64-cpu8]
|
|
runs-on: ${{ matrix.runner }}
|
|
env:
|
|
SCCACHE_GHA_VERSION: branch-checks-rust-${{ matrix.runner }}
|
|
container:
|
|
image: ghcr.io/nvidia/openshell/ci:latest
|
|
credentials:
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Install tools
|
|
run: mise install --locked
|
|
|
|
- name: Configure GHA sccache backend
|
|
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
|
|
|
|
- name: Cache Rust target and registry
|
|
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
|
|
with:
|
|
shared-key: rust-checks-${{ matrix.runner }}
|
|
cache-on-failure: true
|
|
|
|
- name: Format
|
|
run: mise run rust:format:check
|
|
|
|
- name: Lint
|
|
run: mise run rust:lint
|
|
|
|
- name: Test
|
|
run: mise run test:rust
|
|
|
|
- name: sccache stats
|
|
if: always()
|
|
run: |
|
|
set +e
|
|
stats_bin="${SCCACHE_PATH:-sccache}"
|
|
"$stats_bin" --show-stats
|
|
status=$?
|
|
if [ "$status" -ne 0 ]; then
|
|
echo "::warning::sccache stats unavailable (exit $status)"
|
|
fi
|
|
exit 0
|