Revert tests #105
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-latest, macos-latest] | |
features: [ all, no, default ] | |
include: | |
- os: windows-latest | |
- os: macos-latest | |
- os: ubuntu-latest | |
- features: all | |
features_arg: --all-features | |
- features: no | |
features_arg: --no-default-features | |
- features: default | |
features_arg: | |
name: ${{ matrix.os }}, ${{ matrix.toolchain }} toolchain, ${{ matrix.features }} features | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
- 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 | |
run: cargo build ${{ matrix.features_arg }} | |
- name: Run tests | |
run: cargo test ${{ matrix.features_arg }} |