Skip to content

build: (14) Remove unused Rust dependencies (#15) #67

build: (14) Remove unused Rust dependencies (#15)

build: (14) Remove unused Rust dependencies (#15) #67

---
name: Generate Caches
"on":
push:
branches:
- master
# Concurrency serves to prevent simultaneous execution of multiple identical
# workflows in the same branch.
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
generate-linter-caches:
name: Generate Caches for the Rust project linters
strategy:
matrix:
include:
- os: ubuntu-22.04
target: "x86_64-unknown-linux-gnu"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract Rust Channel
shell: bash
id: toolchain
run: ./scripts/extract_rust_channel.sh
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
components: "clippy, rustfmt"
toolchain: ${{ steps.toolchain.outputs.version }}
targets: ${{ matrix.target }}
- name: Cache dependencies
id: cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: rust-${{ matrix.os }}-${{ matrix.target }}-
shared-key: linters
cache-targets: true
cache-all-crates: true
- name: Run cargo command
if: ${{ steps.cache.outputs.cache-hit == 'false' }}
shell: bash
run: |
cargo check \
--all-features \
--all-targets \
--target ${{ matrix.target }}
generate-test-caches:
name: Generate Caches for the release profile
strategy:
matrix:
include:
- os: ubuntu-22.04
target: "x86_64-unknown-linux-gnu"
- os: ubuntu-20.04
target: "x86_64-unknown-linux-gnu"
- os: windows-2022
target: "x86_64-pc-windows-msvc"
- os: macos-13
target: "x86_64-apple-darwin"
- os: macos-14
target: "aarch64-apple-darwin"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract Rust Channel
shell: bash
id: toolchain
run: ./scripts/extract_rust_channel.sh
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.toolchain.outputs.version }}
targets: ${{ matrix.target }}
- name: Cache dependencies
id: cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: rust-${{ matrix.os }}-${{ matrix.target }}-
shared-key: test
cache-targets: true
cache-all-crates: true
- name: Run cargo command
if: ${{ steps.cache.outputs.cache-hit == 'false' }}
shell: bash
run: |
cargo build \
--release \
--all-targets \
--target ${{ matrix.target }}
...