Skip to content

Commit cbfc0ba

Browse files
authored
CI - more hacky v8 fixes (#4171)
# Description of Changes This has been popping up in more places, so I've added this in more places. # API and ABI breaking changes None. CI only. # Expected complexity level and risk 1 # Testing :shrug: --------- Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
1 parent 72ae889 commit cbfc0ba

2 files changed

Lines changed: 36 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ jobs:
6666
cache-workspace-crates: true
6767
prefix-key: v1
6868

69+
# This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a.
70+
# ChatGPT suspects that this could be due to different build invocations using the same target dir,
71+
# and this makes sense to me because we only see it in this job where we mix `cargo build -p` with
72+
# `cargo build --manifest-path` (which apparently build different dependency trees).
73+
# However, we've been unable to fix it so... /shrug
74+
- name: Check v8 outputs
75+
shell: bash
76+
run: |
77+
find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true
78+
if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then
79+
echo "Could not find v8 output file librusty_v8.a; rebuilding manually."
80+
cargo clean -p v8 || true
81+
cargo build -p v8
82+
fi
83+
6984
- uses: actions/setup-dotnet@v4
7085
with:
7186
global-json-file: global.json
@@ -731,13 +746,6 @@ jobs:
731746
save-if: false
732747
prefix-key: v1
733748

734-
- name: Install SpacetimeDB CLI from the local checkout
735-
run: |
736-
cargo install --force --path crates/cli --locked --message-format=short
737-
cargo install --force --path crates/standalone --locked --message-format=short
738-
# Add a handy alias using the old binary name, so that we don't have to rewrite all scripts (incl. in submodules).
739-
ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime
740-
741749
# This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a.
742750
# ChatGPT suspects that this could be due to different build invocations using the same target dir,
743751
# and this makes sense to me because we only see it in this job where we mix `cargo build -p` with
@@ -752,6 +760,13 @@ jobs:
752760
cargo build -p v8
753761
fi
754762
763+
- name: Install SpacetimeDB CLI from the local checkout
764+
run: |
765+
cargo install --force --path crates/cli --locked --message-format=short
766+
cargo install --force --path crates/standalone --locked --message-format=short
767+
# Add a handy alias using the old binary name, so that we don't have to rewrite all scripts (incl. in submodules).
768+
ln -sf $CARGO_HOME/bin/spacetimedb-cli $CARGO_HOME/bin/spacetime
769+
755770
- name: Check quickstart-chat bindings are up to date
756771
working-directory: sdks/csharp
757772
run: |

.github/workflows/typescript-test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,20 @@ jobs:
9292
save-if: false
9393
prefix-key: v1
9494

95+
# This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a.
96+
# ChatGPT suspects that this could be due to different build invocations using the same target dir,
97+
# and this makes sense to me because we only see it in this job where we mix `cargo build -p` with
98+
# `cargo build --manifest-path` (which apparently build different dependency trees).
99+
# However, we've been unable to fix it so... /shrug
100+
- name: Check v8 outputs
101+
run: |
102+
find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true
103+
if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then
104+
echo "Could not find v8 output file librusty_v8.a; rebuilding manually."
105+
cargo clean -p v8 || true
106+
cargo build -p v8
107+
fi
108+
95109
- name: Install SpacetimeDB CLI from the local checkout
96110
run: |
97111
cargo install --force --path crates/cli --locked --message-format=short

0 commit comments

Comments
 (0)