Skip to content

Commit 57e390f

Browse files
committed
[bfops/discord-post-on-merge]: Merge remote-tracking branch 'origin/bfops/use-new-internal-tests' into bfops/discord-post-on-merge
2 parents 303b411 + cd62276 commit 57e390f

292 files changed

Lines changed: 39135 additions & 1302 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Minimal Dockerfile that just wraps pre-built binaries, so we can test the server inside docker
2-
FROM rust:1.90.0
2+
FROM rust:1.93.0
33
RUN mkdir -p /stdb/data
44
COPY ./target/debug/spacetimedb-standalone ./target/debug/spacetimedb-cli /usr/local/bin/
55
COPY ./crates/standalone/config.toml /stdb/data/config.toml

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
runs-on: ubuntu-latest
184184
timeout-minutes: 20 # on a successful run, runs in 8 minutes
185185
container:
186-
image: rust:1.90.0
186+
image: rust:1.93.0
187187
options: --privileged
188188
# filter for a comment containing 'benchmarks please'
189189
if: ${{ github.event_name != 'issue_comment' || (github.event.issue.pull_request && contains(github.event.comment.body, 'benchmarks please')) }}

.github/workflows/ci.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
ref: ${{ env.GIT_REF }}
5353

5454
- uses: dsherret/rust-toolchain-file@v1
55+
- name: Set default rust toolchain
56+
run: rustup default $(rustup show active-toolchain | cut -d' ' -f1)
5557

5658
- name: Cache Rust dependencies
5759
uses: Swatinem/rust-cache@v2
@@ -160,6 +162,8 @@ jobs:
160162
with:
161163
ref: ${{ env.GIT_REF }}
162164
- uses: dsherret/rust-toolchain-file@v1
165+
- name: Set default rust toolchain
166+
run: rustup default $(rustup show active-toolchain | cut -d' ' -f1)
163167
- name: Cache Rust dependencies
164168
uses: Swatinem/rust-cache@v2
165169
with:
@@ -298,12 +302,25 @@ jobs:
298302
with:
299303
run_install: true
300304

305+
# Install cmake and emscripten for C++ module compilation tests.
306+
- name: Install cmake and emscripten
307+
run: |
308+
sudo apt-get update
309+
sudo apt-get install -y cmake
310+
git clone https://github.com/emscripten-core/emsdk.git ~/emsdk
311+
cd ~/emsdk
312+
./emsdk install 4.0.21
313+
./emsdk activate 4.0.21
314+
301315
- name: Build typescript module sdk
302316
working-directory: crates/bindings-typescript
303317
run: pnpm build
304318

319+
# Source emsdk environment to make emcc (Emscripten compiler) available in PATH.
305320
- name: Run tests
306-
run: cargo ci test
321+
run: |
322+
source ~/emsdk/emsdk_env.sh
323+
cargo ci test
307324
308325
lints:
309326
name: Lints
@@ -845,6 +862,12 @@ jobs:
845862
# However, we've been unable to fix it so... /shrug
846863
- name: Check v8 outputs
847864
run: |
865+
find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true
866+
if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then
867+
echo "Could not find v8 output file librusty_v8.a; rebuilding manually."
868+
cargo clean -p v8 || true
869+
cargo build -p v8
870+
fi
848871
find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true
849872
if ! [ -f "${CARGO_TARGET_DIR}"/release/gn_out/obj/librusty_v8.a ]; then
850873
echo "Could not find v8 output file librusty_v8.a; rebuilding manually."
@@ -916,15 +939,16 @@ jobs:
916939
const targetRepo = process.env.TARGET_REPO;
917940
// Use the ref for pull requests because the head sha is brittle (github does some extra dance where it merges in master).
918941
const publicRef = (context.eventName === 'pull_request') ? context.payload.pull_request.head.ref : context.sha;
942+
const publicPrNumber = context.payload.pull_request?.number ?? context.payload.inputs?.pr_number;
919943
const preDispatch = new Date().toISOString();
920-
944+
921945
// Dispatch the workflow in the target repository
922946
await github.rest.actions.createWorkflowDispatch({
923947
owner: targetOwner,
924948
repo: targetRepo,
925949
workflow_id: workflowId,
926950
ref: targetRef,
927-
inputs: { public_ref: publicRef }
951+
inputs: { public_ref: publicRef, public_pr_number: String(publicPrNumber) }
928952
});
929953
930954
const sleep = (ms) => new Promise(r => setTimeout(r, ms));

.github/workflows/upgrade-version-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
run_install: true
2323
- name: Verify that upgrade-version still works
24-
run: cargo bump-versions 123.456.789 --rust-and-cli --csharp --typescript --accept-snapshots
24+
run: cargo bump-versions 123.456.789 --rust-and-cli --csharp --typescript --cpp --accept-snapshots
2525
- name: Show diff
2626
run: git diff HEAD
2727

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ new.json
231231
# Temporary templates dir for CLI's init command
232232
/crates/cli/.templates
233233

234+
# C++ build data
235+
modules/benchmarks-cpp/build/
236+
modules/module-test-cpp/build/
237+
234238
# Symlinked output from `nix build`
235239
result
236240

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ debug = true
106106
version = "1.12.0"
107107
edition = "2021"
108108
# update rust-toolchain.toml too!
109-
rust-version = "1.90.0"
109+
rust-version = "1.93.0"
110110

111111
[workspace.dependencies]
112112
spacetimedb = { path = "crates/bindings", version = "=1.12.0" }

crates/bench/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# See the README for commands to run.
44

55
# sync with: ../../rust-toolchain.toml
6-
FROM rust:1.90.0
6+
FROM rust:1.93.0
77

88
RUN apt-get update && \
99
apt-get install -y valgrind bash && \

crates/bindings-cpp/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build*/

0 commit comments

Comments
 (0)