diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6704b937e5e..7e456e1554f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,13 @@ jobs: with: ref: ${{ env.GIT_REF }} - uses: dsherret/rust-toolchain-file@v1 + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + shared-key: spacetimedb + key: ${{ github.ref }} + cache-on-failure: true + cache-all-crates: true - uses: actions/setup-dotnet@v4 with: global-json-file: global.json @@ -54,6 +61,8 @@ jobs: if: runner.os == 'Windows' run: choco install psql -y --no-progress shell: powershell + - name: Build crates + run: cargo build -p spacetimedb-cli -p spacetimedb-standalone -p spacetimedb-update - name: Build and start database (Linux) if: runner.os == 'Linux' run: docker compose up -d diff --git a/.github/workflows/csharp-test.yml b/.github/workflows/csharp-test.yml index 86ed1740814..df9dbba3363 100644 --- a/.github/workflows/csharp-test.yml +++ b/.github/workflows/csharp-test.yml @@ -70,15 +70,14 @@ jobs: id: cache-rust-deps with: workspaces: demo/Blackholio/server-rust - key: ${{ steps.checkout-stdb.outputs.commit }} + shared-key: spacetimedb + key: ${{ github.ref }} # Cache Rust deps even if unit tests have failed. cache-on-failure: true # Cache the CLI as well. cache-all-crates: true - name: Install SpacetimeDB CLI from the local checkout - # Rebuild only if we didn't get a precise cache hit. - if: steps.cache-rust-deps.outputs.cache-hit == 'false' run: | cargo install --force --path crates/cli --locked --message-format=short cargo install --force --path crates/standalone --locked --message-format=short diff --git a/.github/workflows/typescript-test.yml b/.github/workflows/typescript-test.yml index 572f3e8f7a5..a0d45ad1b43 100644 --- a/.github/workflows/typescript-test.yml +++ b/.github/workflows/typescript-test.yml @@ -86,7 +86,10 @@ jobs: workspaces: | . modules/quickstart-chat - shared-key: quickstart-chat-test + shared-key: spacetimedb + key: ${{ github.ref }} + cache-on-failure: true + cache-all-crates: true - name: Install SpacetimeDB CLI from the local checkout run: |