Skip to content

Commit 4dd6927

Browse files
committed
[bfops/csharp-ci]: try to use local Blackholio
1 parent 0703cdd commit 4dd6927

3 files changed

Lines changed: 10 additions & 16 deletions

File tree

.github/workflows/csharp-test.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v4
15-
with:
16-
submodules: true
1715

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

@@ -47,9 +45,9 @@ jobs:
4745
# Now, setup the Unity tests.
4846

4947
- name: Patch spacetimedb dependency in Cargo.toml
50-
working-directory: sdks/csharp/unity-tests~/server-rust
48+
working-directory: demo/Blackholio/server-rust
5149
run: |
52-
sed -i "s|spacetimedb *=.*|spacetimedb = \{ path = \"../../SpacetimeDB~/crates/bindings\" \}|" Cargo.toml
50+
sed -i "s|spacetimedb *=.*|spacetimedb = \{ path = \"../../../crates/bindings\" \}|" Cargo.toml
5351
cat Cargo.toml
5452
5553
- name: Install Rust toolchain
@@ -59,7 +57,7 @@ jobs:
5957
uses: Swatinem/rust-cache@v2
6058
id: cache-rust-deps
6159
with:
62-
workspaces: sdks/csharp/unity-tests~/server-rust
60+
workspaces: demo/Blackholio/server-rust
6361
key: ${{ steps.checkout-stdb.outputs.commit }}
6462
# Cache Rust deps even if unit tests have failed.
6563
cache-on-failure: true
@@ -76,15 +74,15 @@ jobs:
7674
ln -sf $HOME/.cargo/bin/spacetimedb-cli $HOME/.cargo/bin/spacetime
7775
env:
7876
# Share the target directory with our local project to avoid rebuilding same SpacetimeDB crates twice.
79-
CARGO_TARGET_DIR: sdks/csharp/unity-tests~/server-rust/target
77+
CARGO_TARGET_DIR: demo/Blackholio/server-rust/target
8078

8179
- name: Generate client bindings
82-
working-directory: sdks/csharp/unity-tests~/server-rust
80+
working-directory: demo/Blackholio/server-rust
8381
run: bash ./generate.sh -y
8482

8583
- name: Check for changes
8684
run: |
87-
git diff --exit-code sdks/csharp/unity-tests~/client-unity/Assets/Scripts/autogen || {
85+
git diff --exit-code demo/Blackholio/client-unity/Assets/Scripts/autogen || {
8886
echo "Error: Bindings are dirty. Please generate bindings again and commit them to this branch."
8987
exit 1
9088
}
@@ -105,13 +103,13 @@ jobs:
105103
run: bash sdks/csharp/tools~/run-regression-tests.sh .
106104

107105
- name: Publish unity-tests module to SpacetimeDB
108-
working-directory: sdks/csharp/unity-tests~/server-rust
106+
working-directory: demo/Blackholio/server-rust
109107
run: |
110108
spacetime logout && spacetime login --server-issued-login local
111109
bash ./publish.sh
112110
113111
- name: Patch com.clockworklabs.spacetimedbsdk dependency in manifest.json
114-
working-directory: sdks/csharp/unity-tests~/client-unity/Packages
112+
working-directory: demo/Blackholio/client-unity/Packages
115113
run: |
116114
# Replace the com.clockworklabs.spacetimedbsdk dependency with the current branch.
117115
# TODO: find out why pointing to a local directory doesn't work - is it because Unity CI action uses Docker?
@@ -120,15 +118,15 @@ jobs:
120118
121119
- uses: actions/cache@v3
122120
with:
123-
path: sdks/csharp/unity-tests~/client-unity/Library
121+
path: demo/Blackholio/client-unity/Library
124122
key: Unity-${{ github.head_ref }}
125123
restore-keys: Unity-
126124

127125
- name: Run Unity tests
128126
uses: game-ci/unity-test-runner@v4
129127
with:
130128
unityVersion: 2022.3.32f1 # Adjust Unity version to a valid tag
131-
projectPath: sdks/csharp/unity-tests~/client-unity # Path to the Unity project subdirectory
129+
projectPath: demo/Blackholio/client-unity # Path to the Unity project subdirectory
132130
githubToken: ${{ secrets.GITHUB_TOKEN }}
133131
testMode: playmode
134132
useHostNetwork: true

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

sdks/csharp/unity-tests~

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)