Fix clippy lints #161
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: Build and test | |
on: [ workflow_dispatch, pull_request_target, push ] | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-24.04, macos-latest] | |
features: [ all, no, default ] | |
include: | |
- os: windows-latest | |
- os: macos-latest | |
- os: ubuntu-24.04 | |
- features: all | |
features_arg: --all-features | |
- features: no | |
features_arg: --no-default-features | |
- features: default | |
features_arg: | |
name: ${{ matrix.os }}, nightly, ${{ matrix.features }} features | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt --check | |
- name: Decrypt meshes | |
shell: bash | |
env: | |
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} | |
run: | | |
for FILE in collision_meshes/**/*.gpg; do | |
gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output "${FILE%.gpg}" "$FILE" | |
done | |
- name: Get cached dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Build project (Windows) | |
if: matrix.os == 'windows-latest' | |
shell: cmd | |
run: | | |
set PATH=%PATH:C:\Program Files\LLVM\bin;=% | |
cargo build ${{ matrix.features_arg }} | |
- name: Build project | |
if: matrix.os != 'windows-latest' | |
run: cargo build ${{ matrix.features_arg }} | |
- name: Run tests | |
if: matrix.os != 'windows-latest' | |
run: cargo test ${{ matrix.features_arg }} |