Skip to content
Merged
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
26 changes: 19 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -804,11 +804,22 @@ jobs:
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
RUST_BACKTRACE: full
UNITY_VERSION: 2022.3.32f1
steps:
- name: Checkout repository
id: checkout-stdb
uses: actions/checkout@v4

# Keep this before generation/hydration so ignored build outputs do not affect hashFiles.
- name: Restore Unity Library
id: restore-unity-library
uses: actions/cache/restore@v4
with:
path: demo/Blackholio/client-unity/Library
key: Unity-v2-${{ runner.os }}-${{ env.UNITY_VERSION }}-${{ hashFiles('demo/Blackholio/client-unity/**', 'sdks/csharp/**', 'crates/bindings-csharp/BSATN.Runtime/**', 'crates/bindings-csharp/Runtime/**', 'crates/bindings-csharp/Directory.Build.props', 'tools/regen/src/csharp.rs', 'global.json') }}
restore-keys: |
Unity-v2-${{ runner.os }}-${{ env.UNITY_VERSION }}-
Comment thread
joshua-spacetime marked this conversation as resolved.

# Run cheap .NET tests first. If those fail, no need to run expensive Unity tests.

- name: Setup dotnet
Expand Down Expand Up @@ -917,16 +928,10 @@ jobs:
yq e -i '.dependencies["com.clockworklabs.spacetimedbsdk"] = "file:../../../../sdks/csharp"' manifest.json
cat manifest.json

- uses: actions/cache@v3
with:
path: demo/Blackholio/client-unity/Library
key: Unity-${{ github.head_ref }}
restore-keys: Unity-

- name: Run Unity tests
uses: game-ci/unity-test-runner@v4
with:
unityVersion: 2022.3.32f1 # Adjust Unity version to a valid tag
unityVersion: ${{ env.UNITY_VERSION }}
projectPath: demo/Blackholio/client-unity # Path to the Unity project subdirectory
githubToken: ${{ secrets.GITHUB_TOKEN }}
testMode: playmode
Expand All @@ -937,6 +942,13 @@ jobs:
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}

- name: Save Unity Library
if: ${{ github.ref == 'refs/heads/master' && steps.restore-unity-library.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: demo/Blackholio/client-unity/Library
key: ${{ steps.restore-unity-library.outputs.cache-primary-key }}

godot-testsuite:
needs: [merge_queue_noop, lints]
if: ${{ needs.merge_queue_noop.outputs.skip != 'true' }}
Expand Down
Loading