chore(deps): Update EmbarkStudios/cargo-deny-action action to v1.5.12 #427
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
BUILD_DIR: "${{ github.workspace }}/build/" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions/checkout@v4 | |
- uses: lukka/get-cmake@latest | |
- name: Nightly with rustfmt and clippy | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: rustfmt, clippy | |
override: true | |
- name: Add msbuild to PATH | |
if: matrix.os == 'windows-latest' | |
uses: microsoft/[email protected] | |
with: | |
msbuild-architecture: x64 | |
- name: Add LLVM to PATH | |
if: matrix.os == 'windows-latest' | |
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV | |
- name: Cache LLVM and Clang (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
id: cache-llvm | |
uses: actions/cache@v4 | |
with: | |
path: ${{ runner.temp }}/llvm | |
key: llvm-16.0 | |
- name: Install LLVM and Clang (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "16.0" | |
cached: ${{ steps.cache-llvm.outputs.cache-hit }} | |
directory: ${{ runner.temp }}/llvm | |
- name: Symlink libclang.so (Linux) | |
if: contains(matrix.os, 'ubuntu') | |
run: sudo ln -s libclang-16.so.1 /lib/x86_64-linux-gnu/libclang.so | |
working-directory: ${{ runner.temp }}/llvm | |
- name: Test crate | |
run: cargo test --verbose --features vendor,ttf,mixer | |
- name: Clippy Check | |
run: cargo clippy --verbose --features vendor,ttf,mixer | |
- name: Create docs | |
if: matrix.os == 'ubuntu-latest' | |
run: cargo +nightly doc --features vendor,nightly,vulkan,simd_allocator,ttf,mixer --no-deps | |
- name: Publish test | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: ./rich-sdl2-rust-sys | |
run: cargo publish --dry-run --features vendor | |
- uses: actions/upload-artifact@v4 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
name: doc-artifact | |
path: target/doc/ |