|
52 | 52 | ref: ${{ env.GIT_REF }} |
53 | 53 |
|
54 | 54 | - uses: dsherret/rust-toolchain-file@v1 |
| 55 | + - name: Set default rust toolchain |
| 56 | + run: rustup default $(rustup show active-toolchain | cut -d' ' -f1) |
55 | 57 |
|
56 | 58 | - name: Cache Rust dependencies |
57 | 59 | uses: Swatinem/rust-cache@v2 |
@@ -160,6 +162,8 @@ jobs: |
160 | 162 | with: |
161 | 163 | ref: ${{ env.GIT_REF }} |
162 | 164 | - uses: dsherret/rust-toolchain-file@v1 |
| 165 | + - name: Set default rust toolchain |
| 166 | + run: rustup default $(rustup show active-toolchain | cut -d' ' -f1) |
163 | 167 | - name: Cache Rust dependencies |
164 | 168 | uses: Swatinem/rust-cache@v2 |
165 | 169 | with: |
@@ -298,12 +302,25 @@ jobs: |
298 | 302 | with: |
299 | 303 | run_install: true |
300 | 304 |
|
| 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 | +
|
301 | 315 | - name: Build typescript module sdk |
302 | 316 | working-directory: crates/bindings-typescript |
303 | 317 | run: pnpm build |
304 | 318 |
|
| 319 | + # Source emsdk environment to make emcc (Emscripten compiler) available in PATH. |
305 | 320 | - name: Run tests |
306 | | - run: cargo ci test |
| 321 | + run: | |
| 322 | + source ~/emsdk/emsdk_env.sh |
| 323 | + cargo ci test |
307 | 324 |
|
308 | 325 | lints: |
309 | 326 | name: Lints |
@@ -845,6 +862,12 @@ jobs: |
845 | 862 | # However, we've been unable to fix it so... /shrug |
846 | 863 | - name: Check v8 outputs |
847 | 864 | 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 |
848 | 871 | find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true |
849 | 872 | if ! [ -f "${CARGO_TARGET_DIR}"/release/gn_out/obj/librusty_v8.a ]; then |
850 | 873 | echo "Could not find v8 output file librusty_v8.a; rebuilding manually." |
@@ -916,15 +939,16 @@ jobs: |
916 | 939 | const targetRepo = process.env.TARGET_REPO; |
917 | 940 | // Use the ref for pull requests because the head sha is brittle (github does some extra dance where it merges in master). |
918 | 941 | 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; |
919 | 943 | const preDispatch = new Date().toISOString(); |
920 | | - |
| 944 | +
|
921 | 945 | // Dispatch the workflow in the target repository |
922 | 946 | await github.rest.actions.createWorkflowDispatch({ |
923 | 947 | owner: targetOwner, |
924 | 948 | repo: targetRepo, |
925 | 949 | workflow_id: workflowId, |
926 | 950 | ref: targetRef, |
927 | | - inputs: { public_ref: publicRef } |
| 951 | + inputs: { public_ref: publicRef, public_pr_number: String(publicPrNumber) } |
928 | 952 | }); |
929 | 953 | |
930 | 954 | const sleep = (ms) => new Promise(r => setTimeout(r, ms)); |
|
0 commit comments