Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/harness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Harness

on:
pull_request:
push:
branches:
- "master"
workflow_dispatch:

jobs:
run:
name: Run (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- name: Checkout Commit
uses: actions/checkout@v6

- name: Install Rust
uses: hecrj/setup-rust-action@v2
with:
targets: wasm32-unknown-unknown

# The players are pinned to one commit of the fixtures repo, so the
# cache is keyed on that commit and only a new corpus downloads again.
- name: Read the fixtures commit
id: fixtures
shell: bash
run: |
commit=$(grep -o 'FIXTURES: &str = "[0-9a-f]*' harness/src/main.rs | cut -d '"' -f 2)
echo "commit=$commit" >> "$GITHUB_OUTPUT"

- name: Cache the players
uses: actions/cache@v4
with:
path: harness/target/fixtures/*.zip
key: players-${{ runner.os }}-${{ steps.fixtures.outputs.commit }}

- name: Run the players
if: runner.os == 'Windows'
run: cargo run --release --manifest-path harness/Cargo.toml

# Gives the Linux run a virtual display because Unity 6000.0 to 6000.5
# Linux players crash a few seconds after start without one, even with
# -nographics.
- name: Run the players
if: runner.os == 'Linux'
run: xvfb-run -a cargo run --release --manifest-path harness/Cargo.toml
1 change: 1 addition & 0 deletions harness/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading
Loading