Skip to content

Commit 77362a4

Browse files
authored
Use Linux-built cache/sysroot for Mac CI tester (#18086)
This PR makes the CircleCI builders use the sysroot built by the Linux builder on the mac bot, instead of having the mac bot rebuild all the libraries. It does this by attaching the same workspace that the linux testers do, and then removing the Linux-specific binaries and emsdk, and using the mac EMSDK instead.
1 parent 3bf9821 commit 77362a4

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.circleci/config.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ commands:
9797
echo "WASM_ENGINES = []" >> .emscripten
9898
test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> .emscripten || true
9999
test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> .emscripten || true
100-
test -d ~/wasi-sdk && cp -ar ~/wasi-sdk/lib/ ~/emsdk/upstream/lib/clang/16.0.0/
100+
test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ ~/emsdk/upstream/lib/clang/16.0.0/
101101
cd -
102102
echo "final .emscripten:"
103103
cat ~/emsdk/.emscripten
104104
- emsdk-env
105105
- npm-install
106+
build-libs:
107+
description: "Build all libraries"
108+
steps:
106109
- run:
107110
name: clear cache
108111
command: |
109112
./emcc --clear-cache
110-
build-libs:
111-
description: "Build all libraries, and freeze the cache"
112-
steps:
113113
- pip-install
114114
- run:
115115
name: embuilder build ALL
@@ -584,6 +584,7 @@ jobs:
584584
executor: mac
585585
environment:
586586
EMTEST_SKIP_V8: "1"
587+
EMCC_SKIP_SANITY_CHECK: "1"
587588
steps:
588589
- run:
589590
name: Install brew package dependencies
@@ -594,7 +595,13 @@ jobs:
594595
brew list ninja || brew install ninja
595596
brew list python3 || brew install python3
596597
brew list pkg-config || brew install pkg-config
598+
- attach_workspace:
599+
at: ~/
597600
- checkout
601+
- run:
602+
name: Remove Linux binaries
603+
command: |
604+
rm -rf ~/emsdk ~/vms
598605
- build
599606
# note we do *not* build all libraries and freeze the cache; as we run
600607
# only limited tests here, it's more efficient to build on demand
@@ -655,4 +662,9 @@ workflows:
655662
- build-linux
656663
- test-latest-node
657664
- test-windows
658-
- test-mac
665+
- test-mac:
666+
# The mac tester also uses the libraries built on the linux builder to
667+
# save total build time (this is fine because the libraries are wasm
668+
# and do not depend on the underlying build platform)
669+
requires:
670+
- build-linux

0 commit comments

Comments
 (0)