From 355a3810c747eb615a96fdfade94211aaa001060 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 00:18:33 +0000 Subject: [PATCH 01/41] experimental test-windows setup --- .github/workflows/test-windows.yml | 78 ++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/test-windows.yml diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml new file mode 100644 index 0000000000000..7f7d7e00483a8 --- /dev/null +++ b/.github/workflows/test-windows.yml @@ -0,0 +1,78 @@ +name: test-windows + +on: + create: + tags: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + test-windows: + runs-on: windows-2019 + defaults: + run: + working-directory: 'path with spaces ()' + env: + PYTHONUNBUFFERED: "1" + EMSDK_NOTTY: "1" + EMTEST_LACKS_NATIVE_CLANG: "1" + EMTEST_SKIP_V8: "1" + EMTEST_SKIP_WASM_LEGACY_EH: "1" + EMTEST_SKIP_WASM_EH: "1" + EMTEST_SKIP_WASM64: "1" + EMTEST_SKIP_SCONS: "1" + EMTEST_SKIP_RUST: "1" + EMTEST_SKIP_NODE_25: "1" + EMTEST_BROWSER: "0" + EMSDK_PYTHON: python + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + path: 'path with spaces ()' + + - name: Setup MSVC + uses: ilammy/msvc-dev-cmd@v1 + + - name: Build launcher + run: | + cd tools\pylauncher + cl pylauncher.c /Fe:pylauncher.exe /O1 /GS- /link /NODEFAULTLIB /ENTRY:main /MACHINE:X64 /Brepro ucrt.lib kernel32.lib + shell: cmd + + - name: Install pkgconfiglite + run: choco install -y pkgconfiglite + + - name: Install Emsdk + uses: emscripten-core/setup-emsdk@v16 + with: + version: tot + + - name: Set EM_CONFIG + run: echo "EM_CONFIG=$env:EMSDK\.emscripten" >> $env:GITHUB_ENV + shell: pwsh + + - name: Pip install + run: python -m pip install -r requirements-dev.txt + + - name: Bootstrap + run: python bootstrap.py + + - name: Crossplatform tests + run: test/runner.bat --crossplatform-only + + - name: Sockets tests + run: test/runner.bat sockets.test_nodejs_sockets_echo* + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-windows + path: 'path with spaces ()/out/test-results.xml' From 9ad427cae23b38a0dc961b23f9d35dcb2c59393c Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 00:34:31 +0000 Subject: [PATCH 02/41] minimal linux test --- .github/workflows/build-and-test-linux.yml | 215 +++++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 .github/workflows/build-and-test-linux.yml diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml new file mode 100644 index 0000000000000..938893a7d02f7 --- /dev/null +++ b/.github/workflows/build-and-test-linux.yml @@ -0,0 +1,215 @@ +name: Linux Build and Test + +non: + create: + tags: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + build-linux: + runs-on: ubuntu-latest + env: + EMCC_CORES: 2 + EMCC_USE_NINJA: 1 + EM_COMPILER_WRAPPER: "ccache" + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Get wasmer + run: | + wget https://github.com/wasmerio/wasmer/releases/download/v3.1.1/wasmer-linux-amd64.tar.gz + tar -xf wasmer-linux-amd64.tar.gz + mkdir -p ~/vms + cp bin/wasmer ~/vms + + - name: Get wasmtime + run: | + export VERSION=v0.33.0 + wget https://github.com/bytecodealliance/wasmtime/releases/download/$VERSION/wasmtime-$VERSION-x86_64-linux.tar.xz + tar -xf wasmtime-$VERSION-x86_64-linux.tar.xz + cp wasmtime-$VERSION-x86_64-linux/wasmtime ~/vms + + - name: Get wasi-sdk-sysroot + run: | + wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/libclang_rt.builtins-wasm32-wasi-11.0.tar.gz + wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/wasi-sysroot-11.0.tar.gz + mkdir -p ~/wasi-sdk + tar xf libclang_rt.builtins-wasm32-wasi-11.0.tar.gz -C ~/wasi-sdk + tar xf wasi-sysroot-11.0.tar.gz -C ~/wasi-sdk/ + + - name: Install V8 + run: | + cd $HOME + wget https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-x64.tar.xz + tar -xf node-v15.14.0-linux-x64.tar.xz + export PATH="`pwd`/node-v15.14.0-linux-x64/bin:${PATH}" + npm install jsvu -g + jsvu --os=default --engines=v8 + + - name: Install Emsdk + uses: emscripten-core/setup-emsdk@v16 + with: + version: tot + + - name: Set EM_CONFIG + run: | + echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV + + - name: Setup cache config + run: | + echo "import os" >> $EMSDK/.emscripten + echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten + echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + echo "WASM_ENGINES = []" >> $EMSDK/.emscripten + test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true + test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $(~/emsdk/upstream/bin/clang -print-resource-dir) || true + + - name: Install Linux dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build ccache + + - name: Pip install + run: python -m pip install -r requirements-dev.txt + + - name: Bootstrap + run: ./bootstrap + + - name: Build libraries + run: | + ./emcc --clear-cache + ./embuilder build MINIMAL + ./test/runner test_hello_world + + - name: Clean build directory + run: rm -rf ~/cache/build + + - name: Persist workspace + uses: actions/upload-artifact@v4 + with: + name: emscripten-cache + path: | + ~/.jsvu + ~/cache + ~/vms + ~/wasi-sdk + + test-sanity: + needs: build-linux + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install Emsdk + uses: emscripten-core/setup-emsdk@v16 + with: + version: tot + + - name: Attach workspace + uses: actions/download-artifact@v4 + with: + name: emscripten-cache + path: ~/ + + - name: Set EM_CONFIG + run: | + echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV + + - name: Setup cache config + run: | + echo "import os" >> $EMSDK/.emscripten + echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten + echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + echo "WASM_ENGINES = []" >> $EMSDK/.emscripten + test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true + test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $(~/emsdk/upstream/bin/clang -print-resource-dir) || true + + - name: Install Linux dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build ccache + + - name: Pip install + run: python -m pip install -r requirements-dev.txt + + - name: Bootstrap + run: ./bootstrap + + - name: Run sanity tests + run: ./test/runner sanity + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-sanity + path: out/test-results.xml + + test-core0: + needs: build-linux + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install Emsdk + uses: emscripten-core/setup-emsdk@v16 + with: + version: tot + + - name: Attach workspace + uses: actions/download-artifact@v4 + with: + name: emscripten-cache + path: ~/ + + - name: Set EM_CONFIG + run: | + echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV + + - name: Setup cache config + run: | + echo "import os" >> $EMSDK/.emscripten + echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten + echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + echo "WASM_ENGINES = []" >> $EMSDK/.emscripten + test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true + test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $(~/emsdk/upstream/bin/clang -print-resource-dir) || true + + - name: Install Linux dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build ccache + + - name: Pip install + run: python -m pip install -r requirements-dev.txt + + - name: Bootstrap + run: ./bootstrap + + - name: Run core0 tests + run: ./test/runner core0 + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-core0 + path: out/test-results.xml From 8ac781e8c1f1a7708b9213177b6183b4bd0e3eaa Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 00:37:49 +0000 Subject: [PATCH 03/41] fix typo --- .github/workflows/build-and-test-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 938893a7d02f7..54548d5f121b0 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -1,6 +1,6 @@ name: Linux Build and Test -non: +on: create: tags: push: From e5180a57789812d4e3e6c3b8999e2ab22c84c090 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 00:39:10 +0000 Subject: [PATCH 04/41] invalidate circleci to keep it from running --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 406c5dc6e30cc..94ed65e6e8986 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,4 @@ +asdf-invalid version: 2.1 orbs: From 1ed4169dc929890f8af03776a8a9121d729467db Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 16:47:06 +0000 Subject: [PATCH 05/41] test renaming .jsvu dir --- .github/workflows/build-and-test-linux.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 54548d5f121b0..f3a873c0d8757 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -94,12 +94,15 @@ jobs: - name: Clean build directory run: rm -rf ~/cache/build + - name: Rename hidden .jsvu directory + run: mv ~/.jsvu ~/jsvu-cache + - name: Persist workspace uses: actions/upload-artifact@v4 with: name: emscripten-cache path: | - ~/.jsvu + ~/jsvu-cache ~/cache ~/vms ~/wasi-sdk @@ -122,6 +125,9 @@ jobs: name: emscripten-cache path: ~/ + - name: Restore hidden .jsvu directory + run: mv ~/jsvu-cache ~/.jsvu + - name: Set EM_CONFIG run: | echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV @@ -177,6 +183,9 @@ jobs: name: emscripten-cache path: ~/ + - name: Restore hidden .jsvu directory + run: mv ~/jsvu-cache ~/.jsvu + - name: Set EM_CONFIG run: | echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV From d19549e4f901909f3aabff57acde667510cda23a Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 17:21:26 +0000 Subject: [PATCH 06/41] fix emsdk path and try to fix v8 --- .github/workflows/build-and-test-linux.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index f3a873c0d8757..40d61165b198c 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -72,7 +72,7 @@ jobs: echo "WASM_ENGINES = []" >> $EMSDK/.emscripten test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true - test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $(~/emsdk/upstream/bin/clang -print-resource-dir) || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true - name: Install Linux dependencies run: | @@ -128,6 +128,9 @@ jobs: - name: Restore hidden .jsvu directory run: mv ~/jsvu-cache ~/.jsvu + - name: Grant permissions to v8 + run: chmod +x ~/.jsvu/bin/v8 + - name: Set EM_CONFIG run: | echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV @@ -142,7 +145,7 @@ jobs: echo "WASM_ENGINES = []" >> $EMSDK/.emscripten test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true - test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $(~/emsdk/upstream/bin/clang -print-resource-dir) || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true - name: Install Linux dependencies run: | @@ -186,6 +189,9 @@ jobs: - name: Restore hidden .jsvu directory run: mv ~/jsvu-cache ~/.jsvu + - name: Grant permissions to v8 + run: chmod +x ~/.jsvu/bin/v8 + - name: Set EM_CONFIG run: | echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV @@ -200,7 +206,7 @@ jobs: echo "WASM_ENGINES = []" >> $EMSDK/.emscripten test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true - test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $(~/emsdk/upstream/bin/clang -print-resource-dir) || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true - name: Install Linux dependencies run: | From ffcdd6483f7cd1b163a6b5410833e7c25e3b7141 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 17:52:22 +0000 Subject: [PATCH 07/41] try fixing v8 more --- .github/workflows/build-and-test-linux.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 40d61165b198c..ee12729cd16e2 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -129,7 +129,9 @@ jobs: run: mv ~/jsvu-cache ~/.jsvu - name: Grant permissions to v8 - run: chmod +x ~/.jsvu/bin/v8 + run: | + chmod +x ~/.jsvu/bin/v8 + chmod +x ~/.jsvu/engines/v8/v8 - name: Set EM_CONFIG run: | @@ -190,7 +192,9 @@ jobs: run: mv ~/jsvu-cache ~/.jsvu - name: Grant permissions to v8 - run: chmod +x ~/.jsvu/bin/v8 + run: | + chmod +x ~/.jsvu/bin/v8 + chmod +x ~/.jsvu/engines/v8/v8 - name: Set EM_CONFIG run: | From baab5154d8862d89de0813dbd0d3ac828f572480 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 19:50:02 +0000 Subject: [PATCH 08/41] use tar to persist workspace --- .github/workflows/build-and-test-linux.yml | 29 ++++++---------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index ee12729cd16e2..d773f55081849 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -88,24 +88,19 @@ jobs: - name: Build libraries run: | ./emcc --clear-cache - ./embuilder build MINIMAL ./test/runner test_hello_world - name: Clean build directory run: rm -rf ~/cache/build - - name: Rename hidden .jsvu directory - run: mv ~/.jsvu ~/jsvu-cache + - name: Archive persistent directories + run: tar -czf ~/emscripten-cache.tar.gz -C ~/ .jsvu cache vms wasi-sdk - name: Persist workspace uses: actions/upload-artifact@v4 with: name: emscripten-cache - path: | - ~/jsvu-cache - ~/cache - ~/vms - ~/wasi-sdk + path: ~/emscripten-cache.tar.gz test-sanity: needs: build-linux @@ -125,13 +120,8 @@ jobs: name: emscripten-cache path: ~/ - - name: Restore hidden .jsvu directory - run: mv ~/jsvu-cache ~/.jsvu - - - name: Grant permissions to v8 - run: | - chmod +x ~/.jsvu/bin/v8 - chmod +x ~/.jsvu/engines/v8/v8 + - name: Extract persistent directories + run: tar -xzf ~/emscripten-cache.tar.gz -C ~/ - name: Set EM_CONFIG run: | @@ -188,13 +178,8 @@ jobs: name: emscripten-cache path: ~/ - - name: Restore hidden .jsvu directory - run: mv ~/jsvu-cache ~/.jsvu - - - name: Grant permissions to v8 - run: | - chmod +x ~/.jsvu/bin/v8 - chmod +x ~/.jsvu/engines/v8/v8 + - name: Extract persistent directories + run: tar -xzf ~/emscripten-cache.tar.gz -C ~/ - name: Set EM_CONFIG run: | From 19a9b036aa1c448e9f48481afa6d656d8a6d3245 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 20:23:26 +0000 Subject: [PATCH 09/41] update env variables --- .github/workflows/build-and-test-linux.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index d773f55081849..2bd89beed25ca 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -8,6 +8,13 @@ on: - main pull_request: +env: + LANG: "C.UTF-8" + EMSDK_NOTTY: "1" + EMTEST_WASI_SYSROOT: "/home/runner/wasi-sdk/wasi-sysroot" + EMTEST_DETECT_TEMPFILE_LEAKS: "1" + PYTHONUNBUFFERED: "1" + permissions: contents: read @@ -15,8 +22,8 @@ jobs: build-linux: runs-on: ubuntu-latest env: - EMCC_CORES: 2 - EMCC_USE_NINJA: 1 + EMCC_CORES: "4" + EMCC_USE_NINJA: "1" EM_COMPILER_WRAPPER: "ccache" steps: - name: Checkout repo @@ -105,6 +112,8 @@ jobs: test-sanity: needs: build-linux runs-on: ubuntu-latest + env: + EMCC_CORES: "4" steps: - name: Checkout repo uses: actions/checkout@v4 @@ -163,6 +172,9 @@ jobs: test-core0: needs: build-linux runs-on: ubuntu-latest + env: + EMCC_CORES: "4" + EMTEST_SKIP_NODE_25: "1" steps: - name: Checkout repo uses: actions/checkout@v4 From 2275f710f3ca535b8554795d2ec2d06190c04220 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 21:43:57 +0000 Subject: [PATCH 10/41] add wasm64, refactor --- .github/actions/install-node/action.yml | 28 +++++ .github/actions/install-v8/action.yml | 14 +++ .github/actions/prepare-for-tests/action.yml | 53 ++++++++ .github/workflows/build-and-test-linux.yml | 124 ++++++------------- 4 files changed, 131 insertions(+), 88 deletions(-) create mode 100644 .github/actions/install-node/action.yml create mode 100644 .github/actions/install-v8/action.yml create mode 100644 .github/actions/prepare-for-tests/action.yml diff --git a/.github/actions/install-node/action.yml b/.github/actions/install-node/action.yml new file mode 100644 index 0000000000000..f1a9e3d8a721f --- /dev/null +++ b/.github/actions/install-node/action.yml @@ -0,0 +1,28 @@ +name: 'Install Node' +description: 'Downloads and installs a specified version of Node.js' +inputs: + node_version: + description: 'Node version to install' + required: true + default: '25.4.0' + +runs: + using: "composite" + steps: + - name: Download and Configure Node + run: | + cd $HOME + case "${{ inputs.node_version }}" in + newest) version="25.4.0" ;; + lts) version="22.21.0" ;; + oldest) version="18.3.0" ;; + *) version="${{ inputs.node_version }}" ;; + esac + wget https://nodejs.org/dist/v${version}/node-v${version}-linux-x64.tar.xz + tar xf node-v${version}-linux-x64.tar.xz + echo "NODE_JS_TEST = [os.path.expanduser('~/node-v${version}-linux-x64/bin/node')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS_TEST]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + cat $EMSDK/.emscripten + echo "/home/runner/node-v${version}-linux-x64/bin" >> $GITHUB_PATH + shell: bash diff --git a/.github/actions/install-v8/action.yml b/.github/actions/install-v8/action.yml new file mode 100644 index 0000000000000..f17c85a774080 --- /dev/null +++ b/.github/actions/install-v8/action.yml @@ -0,0 +1,14 @@ +name: 'Install V8' +description: 'Installs V8 via jsvu' +runs: + using: "composite" + steps: + - name: Get V8 + run: | + cd $HOME + wget https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-x64.tar.xz + tar -xf node-v15.14.0-linux-x64.tar.xz + export PATH="`pwd`/node-v15.14.0-linux-x64/bin:${PATH}" + npm install jsvu -g + jsvu --os=default --engines=v8 + shell: bash diff --git a/.github/actions/prepare-for-tests/action.yml b/.github/actions/prepare-for-tests/action.yml new file mode 100644 index 0000000000000..c78dd12bf3c25 --- /dev/null +++ b/.github/actions/prepare-for-tests/action.yml @@ -0,0 +1,53 @@ +name: 'Prepare for Tests' +description: 'Prepares the environment for running Emscripten tests' +runs: + using: "composite" + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install Emsdk + uses: emscripten-core/setup-emsdk@v16 + with: + version: tot + + - name: Attach workspace + uses: actions/download-artifact@v4 + with: + name: emscripten-cache + path: ~/ + + - name: Extract persistent directories + run: tar -xzf ~/emscripten-cache.tar.gz -C ~/ + shell: bash + + - name: Set EM_CONFIG + run: echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV + shell: bash + + - name: Setup cache config + run: | + echo "import os" >> $EMSDK/.emscripten + echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten + echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + echo "WASM_ENGINES = []" >> $EMSDK/.emscripten + test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true + test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true + shell: bash + + - name: Install Linux dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build ccache + shell: bash + + - name: Pip install + run: python -m pip install -r requirements-dev.txt + shell: bash + + - name: Bootstrap + run: ./bootstrap + shell: bash diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 2bd89beed25ca..a92d2bbbb24b2 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -52,13 +52,7 @@ jobs: tar xf wasi-sysroot-11.0.tar.gz -C ~/wasi-sdk/ - name: Install V8 - run: | - cd $HOME - wget https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-x64.tar.xz - tar -xf node-v15.14.0-linux-x64.tar.xz - export PATH="`pwd`/node-v15.14.0-linux-x64/bin:${PATH}" - npm install jsvu -g - jsvu --os=default --engines=v8 + uses: ./.github/actions/install-v8 - name: Install Emsdk uses: emscripten-core/setup-emsdk@v16 @@ -115,49 +109,8 @@ jobs: env: EMCC_CORES: "4" steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Install Emsdk - uses: emscripten-core/setup-emsdk@v16 - with: - version: tot - - - name: Attach workspace - uses: actions/download-artifact@v4 - with: - name: emscripten-cache - path: ~/ - - - name: Extract persistent directories - run: tar -xzf ~/emscripten-cache.tar.gz -C ~/ - - - name: Set EM_CONFIG - run: | - echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV - - - name: Setup cache config - run: | - echo "import os" >> $EMSDK/.emscripten - echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten - echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten - echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten - echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten - echo "WASM_ENGINES = []" >> $EMSDK/.emscripten - test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true - test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true - test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true - - - name: Install Linux dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build ccache - - - name: Pip install - run: python -m pip install -r requirements-dev.txt - - - name: Bootstrap - run: ./bootstrap + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests - name: Run sanity tests run: ./test/runner sanity @@ -176,56 +129,51 @@ jobs: EMCC_CORES: "4" EMTEST_SKIP_NODE_25: "1" steps: - - name: Checkout repo - uses: actions/checkout@v4 + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests - - name: Install Emsdk - uses: emscripten-core/setup-emsdk@v16 - with: - version: tot + - name: Run core0 tests + run: ./test/runner core0 - - name: Attach workspace - uses: actions/download-artifact@v4 + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 with: - name: emscripten-cache - path: ~/ - - - name: Extract persistent directories - run: tar -xzf ~/emscripten-cache.tar.gz -C ~/ + name: test-results-core0 + path: out/test-results.xml - - name: Set EM_CONFIG - run: | - echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV + test-wasm64-4gb: + needs: build-linux + runs-on: ubuntu-latest + env: + EMCC_CORES: 4 + steps: + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests - - name: Setup cache config - run: | - echo "import os" >> $EMSDK/.emscripten - echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten - echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten - echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten - echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten - echo "WASM_ENGINES = []" >> $EMSDK/.emscripten - test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true - test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true - test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true + - name: Reinstall V8 + run: rm -rf $HOME/.jsvu + shell: bash - - name: Install Linux dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build ccache + - name: Install V8 + uses: ./.github/actions/install-v8 - - name: Pip install - run: python -m pip install -r requirements-dev.txt + - name: Install Node newest + uses: ./.github/actions/install-node + with: + node_version: newest - - name: Bootstrap - run: ./bootstrap + - name: Configure Node v25 + run: echo "NODE_JS = NODE_JS_TEST" >> $EMSDK/.emscripten + shell: bash - - name: Run core0 tests - run: ./test/runner core0 + - name: Run wasm64_4gb tests + run: ./test/runner wasm64_4gb + shell: bash - name: Upload test results if: always() uses: actions/upload-artifact@v4 with: - name: test-results-core0 + name: test-results-wasm64-4gb path: out/test-results.xml From 105b59daab49b8fa7f1ac08d19c09f7f9ae9b70d Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 22 Apr 2026 23:53:18 +0000 Subject: [PATCH 11/41] checkout before local actions --- .github/actions/prepare-for-tests/action.yml | 3 --- .github/workflows/build-and-test-linux.yml | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/actions/prepare-for-tests/action.yml b/.github/actions/prepare-for-tests/action.yml index c78dd12bf3c25..2790bd26ab118 100644 --- a/.github/actions/prepare-for-tests/action.yml +++ b/.github/actions/prepare-for-tests/action.yml @@ -3,9 +3,6 @@ description: 'Prepares the environment for running Emscripten tests' runs: using: "composite" steps: - - name: Checkout repo - uses: actions/checkout@v4 - - name: Install Emsdk uses: emscripten-core/setup-emsdk@v16 with: diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index a92d2bbbb24b2..e8fec0c1a5d2b 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -109,6 +109,9 @@ jobs: env: EMCC_CORES: "4" steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Prepare for tests uses: ./.github/actions/prepare-for-tests @@ -129,6 +132,9 @@ jobs: EMCC_CORES: "4" EMTEST_SKIP_NODE_25: "1" steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Prepare for tests uses: ./.github/actions/prepare-for-tests @@ -148,6 +154,9 @@ jobs: env: EMCC_CORES: 4 steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Prepare for tests uses: ./.github/actions/prepare-for-tests From 67a389f65c6eca901523eb38e016909d4bff676b Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Thu, 23 Apr 2026 23:36:49 +0000 Subject: [PATCH 12/41] add chrome --- .github/actions/install-chrome/action.yml | 20 ++ .../actions/install-node-newest/action.yml | 16 ++ .github/actions/install-node/#action.yml# | 29 +++ .github/actions/install-node/.#action.yml | 1 + .github/workflows/#build-and-test-linux.yml# | 218 ++++++++++++++++++ .github/workflows/build-and-test-linux.yml | 45 ++++ 6 files changed, 329 insertions(+) create mode 100644 .github/actions/install-chrome/action.yml create mode 100644 .github/actions/install-node-newest/action.yml create mode 100644 .github/actions/install-node/#action.yml# create mode 120000 .github/actions/install-node/.#action.yml create mode 100644 .github/workflows/#build-and-test-linux.yml# diff --git a/.github/actions/install-chrome/action.yml b/.github/actions/install-chrome/action.yml new file mode 100644 index 0000000000000..4fdcb796deecd --- /dev/null +++ b/.github/actions/install-chrome/action.yml @@ -0,0 +1,20 @@ +name: 'Install Chrome' +description: 'Installs Google Chrome' +runs: + using: "composite" + steps: + - name: Download and install Chrome + run: | + if [ -f /usr/bin/google-chrome ]; then + echo "Google Chrome is already installed:" + /usr/bin/google-chrome --version + else + sudo apt-get update + sudo apt-get install -q -y libu2f-udev libvulkan1 xdg-utils + wget -O ~/chrome.deb https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb + sudo dpkg -i ~/chrome.deb + echo "Chrome version:" + /usr/bin/google-chrome --version + fi + shell: bash + diff --git a/.github/actions/install-node-newest/action.yml b/.github/actions/install-node-newest/action.yml new file mode 100644 index 0000000000000..ab8a344d5b32b --- /dev/null +++ b/.github/actions/install-node-newest/action.yml @@ -0,0 +1,16 @@ +name: 'Install Node Newest' +description: 'Installs Node v25.4.0' +runs: + using: "composite" + steps: + - name: Download Node + run: | + cd $HOME + wget https://nodejs.org/dist/v25.4.0/node-v25.4.0-linux-x64.tar.xz + tar xf node-v25.4.0-linux-x64.tar.xz + echo "NODE_JS_TEST = [os.path.expanduser('~/node-v25.4.0-linux-x64/bin/node')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS_TEST]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + cat $EMSDK/.emscripten + echo "/home/runner/node-v25.4.0-linux-x64/bin" >> $GITHUB_PATH + shell: bash diff --git a/.github/actions/install-node/#action.yml# b/.github/actions/install-node/#action.yml# new file mode 100644 index 0000000000000..4ba0474323aa3 --- /dev/null +++ b/.github/actions/install-node/#action.yml# @@ -0,0 +1,29 @@ +name: 'Install Node' +description: 'Downloads and installs a specified version of Node.js' +inputs: + node_version: + description: 'Node version to install' + required: true + default: '25.4.0' + +runs: + using: "composite" + steps: + - name: Download and Configure Node + run: | + cd $HOME + case "${{ inputs.node_version }}" in + newest) version="25.4.0" ;; + lts) version="22.21.0" ;; + # Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py` + oldest) version="18.3.0" ;; + *) version="${{ inputs.node_version }}" ;; + esac + wget https://nodejs.org/dist/v${version}/node-v${version}-linux-x64.tar.xz + tar xf node-v${version}-linux-x64.tar.xz + echo "NODE_JS_TEST = [os.path.expanduser('~/node-v${version}-linux-x64/bin/node')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS_TEST]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + cat $EMSDK/.emscripten + echo "/home/runner/node-v${version}-linux-x64/bin" >> $GITHUB_PATH + shell: bash diff --git a/.github/actions/install-node/.#action.yml b/.github/actions/install-node/.#action.yml new file mode 120000 index 0000000000000..25dfa1c8ee874 --- /dev/null +++ b/.github/actions/install-node/.#action.yml @@ -0,0 +1 @@ +dschuff@mirasol.c.googlers.com.2270904:1775861650 \ No newline at end of file diff --git a/.github/workflows/#build-and-test-linux.yml# b/.github/workflows/#build-and-test-linux.yml# new file mode 100644 index 0000000000000..7d99dd1c9ad4f --- /dev/null +++ b/.github/workflows/#build-and-test-linux.yml# @@ -0,0 +1,218 @@ +name: Linux Build and Test + +on: + create: + tags: + push: + branches: + - main + pull_request: + +env: + LANG: "C.UTF-8" + EMSDK_NOTTY: "1" + EMTEST_WASI_SYSROOT: "/home/runner/wasi-sdk/wasi-sysroot" + EMTEST_DETECT_TEMPFILE_LEAKS: "1" + PYTHONUNBUFFERED: "1" + +permissions: + contents: read + +jobs: + build-linux: + runs-on: ubuntu-latest + env: + EMCC_CORES: "4" + EMCC_USE_NINJA: "1" + EM_COMPILER_WRAPPER: "ccache" + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Get wasmer + run: | + wget https://github.com/wasmerio/wasmer/releases/download/v3.1.1/wasmer-linux-amd64.tar.gz + tar -xf wasmer-linux-amd64.tar.gz + mkdir -p ~/vms + cp bin/wasmer ~/vms + + - name: Get wasmtime + run: | + export VERSION=v0.33.0 + wget https://github.com/bytecodealliance/wasmtime/releases/download/$VERSION/wasmtime-$VERSION-x86_64-linux.tar.xz + tar -xf wasmtime-$VERSION-x86_64-linux.tar.xz + cp wasmtime-$VERSION-x86_64-linux/wasmtime ~/vms + + - name: Get wasi-sdk-sysroot + run: | + wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/libclang_rt.builtins-wasm32-wasi-11.0.tar.gz + wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/wasi-sysroot-11.0.tar.gz + mkdir -p ~/wasi-sdk + tar xf libclang_rt.builtins-wasm32-wasi-11.0.tar.gz -C ~/wasi-sdk + tar xf wasi-sysroot-11.0.tar.gz -C ~/wasi-sdk/ + + - name: Install V8 + run: | + cd $HOME + wget https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-x64.tar.xz + tar -xf node-v15.14.0-linux-x64.tar.xz + export PATH="`pwd`/node-v15.14.0-linux-x64/bin:${PATH}" + npm install jsvu -g + jsvu --os=default --engines=v8 + + - name: Install Emsdk + uses: emscripten-core/setup-emsdk@v16 + with: + version: tot + + - name: Set EM_CONFIG + run: | + echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV + + - name: Setup cache config + run: | + echo "import os" >> $EMSDK/.emscripten + echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten + echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + echo "WASM_ENGINES = []" >> $EMSDK/.emscripten + test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true + test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true + + - name: Install Linux dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build ccache + + - name: Pip install + run: python -m pip install -r requirements-dev.txt + + - name: Bootstrap + run: ./bootstrap + + - name: Build libraries + run: | + ./emcc --clear-cache + ./test/runner test_hello_world + + - name: Clean build directory + run: rm -rf ~/cache/build + + - name: Archive persistent directories + run: tar -czf ~/emscripten-cache.tar.gz -C ~/ .jsvu cache vms wasi-sdk + + - name: Persist workspace + uses: actions/upload-artifact@v4 + with: + name: emscripten-cache + path: ~/emscripten-cache.tar.gz + + test-sanity: + needs: build-linux + runs-on: ubuntu-latest + env: + EMCC_CORES: "4" + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install Emsdk + uses: emscripten-core/setup-emsdk@v16 + with: + version: tot + + - name: Attach workspace + uses: actions/download-artifact@v4 + with: + name: emscripten-cache + path: ~/ + + - name: Extract persistent directories + run: tar -xzf ~/emscripten-cache.tar.gz -C ~/ + + - name: Set EM_CONFIG + run: | + echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV + + - name: Setup cache config + run: | + echo "import os" >> $EMSDK/.emscripten + echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten + echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + echo "WASM_ENGINES = []" >> $EMSDK/.emscripten + test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true + test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true + + - name: Install Linux dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build ccache + + - name: Pip install + run: python -m pip install -r requirements-dev.txt + + - name: Bootstrap + run: ./bootstrap + + - name: Run sanity tests + run: ./test/runner sanity + + test-core0: + needs: build-linux + runs-on: ubuntu-latest + env: + EMCC_CORES: "4" + EMTEST_SKIP_NODE_25: "1" + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Install Emsdk + uses: emscripten-core/setup-emsdk@v16 + with: + version: tot + + - name: Attach workspace + uses: actions/download-artifact@v4 + with: + name: emscripten-cache + path: ~/ + + - name: Extract persistent directories + run: tar -xzf ~/emscripten-cache.tar.gz -C ~/ + + - name: Set EM_CONFIG + run: | + echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV + + - name: Setup cache config + run: | + echo "import os" >> $EMSDK/.emscripten + echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten + echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten + echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten + echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten + echo "WASM_ENGINES = []" >> $EMSDK/.emscripten + test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true + test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true + test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true + + - name: Install Linux dependencies + run: | + sudo apt-get update + sudo apt-get install -y ninja-build ccache + + - name: Pip install + run: python -m pip install -r requirements-dev.txt + + - name: Bootstrap + run: ./bootstrap + + - name: Run core0 tests + run: ./test/runner core0 + diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index e8fec0c1a5d2b..aac12dec788dd 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -186,3 +186,48 @@ jobs: with: name: test-results-wasm64-4gb path: out/test-results.xml + + test-browser-chrome: + needs: build-linux + runs-on: ubuntu-latest + env: + EMTEST_LACKS_WEBGPU: "1" + EMTEST_DETECT_TEMPFILE_LEAKS: "0" + EMTEST_HEADLESS: "1" + EMTEST_BROWSER: "/usr/bin/google-chrome" + EMTEST_CORES: "2" + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Install Chrome + uses: ./.github/actions/install-chrome + + - name: Run browser chrome tests + run: | + export EM_FROZEN_CACHE="" + ./test/runner \ + browser.test_gl_stride \ + browser.test_memory_growth_during_startup \ + browser.test_pthread_large_pthread_allocation \ + browser.test_pthread_sbrk* \ + browser.test_pthread_asan* \ + browser.test_webgl_multi_draw* \ + browser.test_pthread_growth* \ + browser.test_4gb \ + browser.test_emmalloc_3gb* \ + browser.test_dlmalloc_3gb \ + browser.test_2gb_fail \ + browser.test_audio_worklet* + shell: bash + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-browser-chrome + path: out/test-results.xml + From 7fff0eaca7c5a48e9918919152dd53d524cfae5c Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 16:21:03 +0000 Subject: [PATCH 13/41] add other chrome tests --- .github/actions/run-tests-chrome/action.yml | 54 ++++++++++++++ .github/workflows/build-and-test-linux.yml | 78 ++++++++++++--------- 2 files changed, 98 insertions(+), 34 deletions(-) create mode 100644 .github/actions/run-tests-chrome/action.yml diff --git a/.github/actions/run-tests-chrome/action.yml b/.github/actions/run-tests-chrome/action.yml new file mode 100644 index 0000000000000..cbbf7f90ddc32 --- /dev/null +++ b/.github/actions/run-tests-chrome/action.yml @@ -0,0 +1,54 @@ +name: 'Run Tests Chrome' +description: 'Common steps for running tests under Google Chrome' +inputs: + test_targets: + description: 'Test targets to run' + required: true + title: + description: 'Title of the test run' + required: true + visualize: + description: 'Set EMTEST_VISUALIZE=1 and check profile' + default: 'false' + +runs: + using: 'composite' + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Install Chrome + uses: ./.github/actions/install-chrome + + - name: Run browser tests + run: | + export EMTEST_DETECT_TEMPFILE_LEAKS="0" + export EMTEST_HEADLESS="1" + export EMTEST_BROWSER="/usr/bin/google-chrome" + export EMTEST_CORES="2" + export EM_FROZEN_CACHE="" + export EMTEST_LACKS_WEBGPU="1" + export EMTEST_LACKS_SOUND_HARDWARE="1" + + if [ "${{ inputs.visualize }}" = "true" ]; then + export EMTEST_VISUALIZE="1" + fi + + ./test/runner ${{ inputs.test_targets }} + shell: bash + + - name: Check profile + if: inputs.visualize == 'true' + run: test -s out/graph.html + shell: bash + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-${{ inputs.title }} + path: out/test-results.xml + diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index aac12dec788dd..7f5c9d746354f 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -190,44 +190,54 @@ jobs: test-browser-chrome: needs: build-linux runs-on: ubuntu-latest - env: - EMTEST_LACKS_WEBGPU: "1" - EMTEST_DETECT_TEMPFILE_LEAKS: "0" - EMTEST_HEADLESS: "1" - EMTEST_BROWSER: "/usr/bin/google-chrome" - EMTEST_CORES: "2" steps: - - name: Checkout repo - uses: actions/checkout@v4 + - name: Run browser chrome tests + uses: ./.github/actions/run-tests-chrome + with: + title: 'browser-chrome' + test_targets: 'browser.test_gl_stride browser.test_memory_growth_during_startup browser.test_pthread_large_pthread_allocation browser.test_pthread_sbrk* browser.test_pthread_asan* browser.test_webgl_multi_draw* browser.test_pthread_growth* browser.test_4gb browser.test_emmalloc_3gb* browser.test_dlmalloc_3gb browser.test_2gb_fail browser.test_audio_worklet*' - - name: Prepare for tests - uses: ./.github/actions/prepare-for-tests + test-browser-chrome-wasm64: + needs: build-linux + runs-on: ubuntu-latest + steps: + - name: Run browser64 tests + uses: ./.github/actions/run-tests-chrome + with: + title: 'browser-chrome-wasm64' + test_targets: 'browser64.test_emscripten_animate_canvas_element_size* browser64.test_*malloc_*gb* browser64.test_emmalloc_memgrowth browser64.test_subdata_es2* browser64.test_webgl2_garbage_free_entrypoints* browser64.test_gl_stride browser64.test_webgl2_get_buffer_sub_data browser64.test_webgl2_pbo browser64.test_webgl2_sokol* browser64.test_memory_growth_during_startup browser64.test_pthread_large_pthread_allocation browser64.test_pthread_sbrk* browser64.test_pthread_asan* browser64.test_webgl_multi_draw* browser64.test_pthread_growth*' + visualize: 'true' - - name: Install Chrome - uses: ./.github/actions/install-chrome + test-browser-chrome-2gb: + needs: build-linux + runs-on: ubuntu-latest + steps: + - name: Run browser_2gb tests + uses: ./.github/actions/run-tests-chrome + with: + title: 'browser-chrome-2gb' + test_targets: 'browser_2gb' - - name: Run browser chrome tests - run: | - export EM_FROZEN_CACHE="" - ./test/runner \ - browser.test_gl_stride \ - browser.test_memory_growth_during_startup \ - browser.test_pthread_large_pthread_allocation \ - browser.test_pthread_sbrk* \ - browser.test_pthread_asan* \ - browser.test_webgl_multi_draw* \ - browser.test_pthread_growth* \ - browser.test_4gb \ - browser.test_emmalloc_3gb* \ - browser.test_dlmalloc_3gb \ - browser.test_2gb_fail \ - browser.test_audio_worklet* - shell: bash + test-browser-chrome-wasm64-4gb: + needs: build-linux + runs-on: ubuntu-latest + steps: + - name: Run browser64_4gb tests + uses: ./.github/actions/run-tests-chrome + with: + title: 'browser-chrome-wasm64-4gb' + test_targets: 'browser64_4gb' - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 + test-sockets-chrome: + needs: build-linux + runs-on: ubuntu-latest + steps: + - name: Run sockets tests + uses: ./.github/actions/run-tests-chrome with: - name: test-results-browser-chrome - path: out/test-results.xml + title: 'sockets-chrome' + test_targets: 'sockets' + + + From af9d2b810dea89ea362a4a0562d8be7158a6020a Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 16:39:23 +0000 Subject: [PATCH 14/41] Fix checkout --- .github/actions/install-node/#action.yml# | 29 --- .github/actions/install-node/.#action.yml | 1 - .github/actions/run-tests-chrome/action.yml | 3 - .github/workflows/#build-and-test-linux.yml# | 218 ------------------- .github/workflows/build-and-test-linux.yml | 16 ++ 5 files changed, 16 insertions(+), 251 deletions(-) delete mode 100644 .github/actions/install-node/#action.yml# delete mode 120000 .github/actions/install-node/.#action.yml delete mode 100644 .github/workflows/#build-and-test-linux.yml# diff --git a/.github/actions/install-node/#action.yml# b/.github/actions/install-node/#action.yml# deleted file mode 100644 index 4ba0474323aa3..0000000000000 --- a/.github/actions/install-node/#action.yml# +++ /dev/null @@ -1,29 +0,0 @@ -name: 'Install Node' -description: 'Downloads and installs a specified version of Node.js' -inputs: - node_version: - description: 'Node version to install' - required: true - default: '25.4.0' - -runs: - using: "composite" - steps: - - name: Download and Configure Node - run: | - cd $HOME - case "${{ inputs.node_version }}" in - newest) version="25.4.0" ;; - lts) version="22.21.0" ;; - # Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py` - oldest) version="18.3.0" ;; - *) version="${{ inputs.node_version }}" ;; - esac - wget https://nodejs.org/dist/v${version}/node-v${version}-linux-x64.tar.xz - tar xf node-v${version}-linux-x64.tar.xz - echo "NODE_JS_TEST = [os.path.expanduser('~/node-v${version}-linux-x64/bin/node')]" >> $EMSDK/.emscripten - echo "JS_ENGINES = [NODE_JS_TEST]" >> $EMSDK/.emscripten - echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten - cat $EMSDK/.emscripten - echo "/home/runner/node-v${version}-linux-x64/bin" >> $GITHUB_PATH - shell: bash diff --git a/.github/actions/install-node/.#action.yml b/.github/actions/install-node/.#action.yml deleted file mode 120000 index 25dfa1c8ee874..0000000000000 --- a/.github/actions/install-node/.#action.yml +++ /dev/null @@ -1 +0,0 @@ -dschuff@mirasol.c.googlers.com.2270904:1775861650 \ No newline at end of file diff --git a/.github/actions/run-tests-chrome/action.yml b/.github/actions/run-tests-chrome/action.yml index cbbf7f90ddc32..ace4f53ceb008 100644 --- a/.github/actions/run-tests-chrome/action.yml +++ b/.github/actions/run-tests-chrome/action.yml @@ -14,9 +14,6 @@ inputs: runs: using: 'composite' steps: - - name: Checkout repo - uses: actions/checkout@v4 - - name: Prepare for tests uses: ./.github/actions/prepare-for-tests diff --git a/.github/workflows/#build-and-test-linux.yml# b/.github/workflows/#build-and-test-linux.yml# deleted file mode 100644 index 7d99dd1c9ad4f..0000000000000 --- a/.github/workflows/#build-and-test-linux.yml# +++ /dev/null @@ -1,218 +0,0 @@ -name: Linux Build and Test - -on: - create: - tags: - push: - branches: - - main - pull_request: - -env: - LANG: "C.UTF-8" - EMSDK_NOTTY: "1" - EMTEST_WASI_SYSROOT: "/home/runner/wasi-sdk/wasi-sysroot" - EMTEST_DETECT_TEMPFILE_LEAKS: "1" - PYTHONUNBUFFERED: "1" - -permissions: - contents: read - -jobs: - build-linux: - runs-on: ubuntu-latest - env: - EMCC_CORES: "4" - EMCC_USE_NINJA: "1" - EM_COMPILER_WRAPPER: "ccache" - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Get wasmer - run: | - wget https://github.com/wasmerio/wasmer/releases/download/v3.1.1/wasmer-linux-amd64.tar.gz - tar -xf wasmer-linux-amd64.tar.gz - mkdir -p ~/vms - cp bin/wasmer ~/vms - - - name: Get wasmtime - run: | - export VERSION=v0.33.0 - wget https://github.com/bytecodealliance/wasmtime/releases/download/$VERSION/wasmtime-$VERSION-x86_64-linux.tar.xz - tar -xf wasmtime-$VERSION-x86_64-linux.tar.xz - cp wasmtime-$VERSION-x86_64-linux/wasmtime ~/vms - - - name: Get wasi-sdk-sysroot - run: | - wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/libclang_rt.builtins-wasm32-wasi-11.0.tar.gz - wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/wasi-sysroot-11.0.tar.gz - mkdir -p ~/wasi-sdk - tar xf libclang_rt.builtins-wasm32-wasi-11.0.tar.gz -C ~/wasi-sdk - tar xf wasi-sysroot-11.0.tar.gz -C ~/wasi-sdk/ - - - name: Install V8 - run: | - cd $HOME - wget https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-x64.tar.xz - tar -xf node-v15.14.0-linux-x64.tar.xz - export PATH="`pwd`/node-v15.14.0-linux-x64/bin:${PATH}" - npm install jsvu -g - jsvu --os=default --engines=v8 - - - name: Install Emsdk - uses: emscripten-core/setup-emsdk@v16 - with: - version: tot - - - name: Set EM_CONFIG - run: | - echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV - - - name: Setup cache config - run: | - echo "import os" >> $EMSDK/.emscripten - echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten - echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten - echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten - echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten - echo "WASM_ENGINES = []" >> $EMSDK/.emscripten - test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true - test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true - test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true - - - name: Install Linux dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build ccache - - - name: Pip install - run: python -m pip install -r requirements-dev.txt - - - name: Bootstrap - run: ./bootstrap - - - name: Build libraries - run: | - ./emcc --clear-cache - ./test/runner test_hello_world - - - name: Clean build directory - run: rm -rf ~/cache/build - - - name: Archive persistent directories - run: tar -czf ~/emscripten-cache.tar.gz -C ~/ .jsvu cache vms wasi-sdk - - - name: Persist workspace - uses: actions/upload-artifact@v4 - with: - name: emscripten-cache - path: ~/emscripten-cache.tar.gz - - test-sanity: - needs: build-linux - runs-on: ubuntu-latest - env: - EMCC_CORES: "4" - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Install Emsdk - uses: emscripten-core/setup-emsdk@v16 - with: - version: tot - - - name: Attach workspace - uses: actions/download-artifact@v4 - with: - name: emscripten-cache - path: ~/ - - - name: Extract persistent directories - run: tar -xzf ~/emscripten-cache.tar.gz -C ~/ - - - name: Set EM_CONFIG - run: | - echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV - - - name: Setup cache config - run: | - echo "import os" >> $EMSDK/.emscripten - echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten - echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten - echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten - echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten - echo "WASM_ENGINES = []" >> $EMSDK/.emscripten - test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true - test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true - test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true - - - name: Install Linux dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build ccache - - - name: Pip install - run: python -m pip install -r requirements-dev.txt - - - name: Bootstrap - run: ./bootstrap - - - name: Run sanity tests - run: ./test/runner sanity - - test-core0: - needs: build-linux - runs-on: ubuntu-latest - env: - EMCC_CORES: "4" - EMTEST_SKIP_NODE_25: "1" - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Install Emsdk - uses: emscripten-core/setup-emsdk@v16 - with: - version: tot - - - name: Attach workspace - uses: actions/download-artifact@v4 - with: - name: emscripten-cache - path: ~/ - - - name: Extract persistent directories - run: tar -xzf ~/emscripten-cache.tar.gz -C ~/ - - - name: Set EM_CONFIG - run: | - echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV - - - name: Setup cache config - run: | - echo "import os" >> $EMSDK/.emscripten - echo "CACHE = os.path.expanduser('~/cache')" >> $EMSDK/.emscripten - echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> $EMSDK/.emscripten - echo "JS_ENGINES = [NODE_JS]" >> $EMSDK/.emscripten - echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten - echo "WASM_ENGINES = []" >> $EMSDK/.emscripten - test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> $EMSDK/.emscripten || true - test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true - test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true - - - name: Install Linux dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build ccache - - - name: Pip install - run: python -m pip install -r requirements-dev.txt - - - name: Bootstrap - run: ./bootstrap - - - name: Run core0 tests - run: ./test/runner core0 - diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 7f5c9d746354f..3d2334b3e7f5f 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -191,6 +191,9 @@ jobs: needs: build-linux runs-on: ubuntu-latest steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Run browser chrome tests uses: ./.github/actions/run-tests-chrome with: @@ -201,6 +204,9 @@ jobs: needs: build-linux runs-on: ubuntu-latest steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Run browser64 tests uses: ./.github/actions/run-tests-chrome with: @@ -212,6 +218,9 @@ jobs: needs: build-linux runs-on: ubuntu-latest steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Run browser_2gb tests uses: ./.github/actions/run-tests-chrome with: @@ -222,6 +231,9 @@ jobs: needs: build-linux runs-on: ubuntu-latest steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Run browser64_4gb tests uses: ./.github/actions/run-tests-chrome with: @@ -232,6 +244,9 @@ jobs: needs: build-linux runs-on: ubuntu-latest steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Run sockets tests uses: ./.github/actions/run-tests-chrome with: @@ -241,3 +256,4 @@ jobs: + From ce672de1e9a0b532a2dabf7adf0ef5a0539dbc6e Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 17:04:48 +0000 Subject: [PATCH 15/41] add test-other --- .github/workflows/build-and-test-linux.yml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 3d2334b3e7f5f..762ccf0fe8f80 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -253,6 +253,48 @@ jobs: title: 'sockets-chrome' test_targets: 'sockets' + test-other: + needs: build-linux + runs-on: ubuntu-latest + env: + EMCC_CORES: "4" + EMTEST_SKIP_NODE_25: "1" + EMTEST_SKIP_RUST: "1" + EMTEST_SKIP_WASM64: "1" + EMTEST_SKIP_NEW_CMAKE: "1" + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Install Scons + run: | + sudo apt-get update + sudo apt-get install -y scons + shell: bash + + - name: Setup Rust target + run: rustup target add wasm32-unknown-emscripten + shell: bash + + - name: Run other and jslib tests + run: ./test/runner other jslib skip:other.test_native_link_error_message + shell: bash + + - name: Run primes benchmark + run: ./test/runner benchmark.test_primes + shell: bash + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-other + path: out/test-results.xml + + From d1f5984a8d5d7e683f6e222dfb670b12d2dc52df Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 17:50:20 +0000 Subject: [PATCH 16/41] add linters --- .github/workflows/build-and-test-linux.yml | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 762ccf0fe8f80..063cbee049342 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -294,6 +294,51 @@ jobs: name: test-results-other path: out/test-results.xml + linters: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '24.13.1' + + - name: Install Python dependencies + run: python -m pip install -r requirements-dev.txt + shell: bash + + - name: Run ruff + run: ruff check + shell: bash + + - name: Run vulture + run: vulture . --min-confidence 100 + shell: bash + + - name: Run mypy + run: mypy + shell: bash + + - name: Install Node dependencies + run: npm ci + shell: bash + + - name: Run eslint (lint) + run: npm run lint + shell: bash + + - name: Run eslint (check) + run: npm run check + shell: bash + + From 712b905424248ca55355725e7aa0f65eafbeac05 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 21:21:07 +0000 Subject: [PATCH 17/41] try runnig one on premerge --- .github/workflows/build-and-test-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 063cbee049342..93fec8f8eb0df 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -127,7 +127,7 @@ jobs: test-core0: needs: build-linux - runs-on: ubuntu-latest + runs-on: emscripten-premerge-linux-runners env: EMCC_CORES: "4" EMTEST_SKIP_NODE_25: "1" From 4f09d25d1fd01b412169b604ecd686cc662c90b9 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 21:56:58 +0000 Subject: [PATCH 18/41] Install packages missing from base gha runner --- .github/actions/install-basic-packages/action.yml | 10 ++++++++++ .github/actions/prepare-for-tests/action.yml | 9 +++------ .github/workflows/build-and-test-linux.yml | 11 +++++++---- 3 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 .github/actions/install-basic-packages/action.yml diff --git a/.github/actions/install-basic-packages/action.yml b/.github/actions/install-basic-packages/action.yml new file mode 100644 index 0000000000000..d30b5469572ae --- /dev/null +++ b/.github/actions/install-basic-packages/action.yml @@ -0,0 +1,10 @@ +name: 'Install Basic Packages' +description: 'Installs xz and ninja-build' +runs: + using: 'composite' + steps: + - name: Install packages + run: | + sudo apt-get update + sudo apt-get install -y xz-utils ninja-build + shell: bash diff --git a/.github/actions/prepare-for-tests/action.yml b/.github/actions/prepare-for-tests/action.yml index 2790bd26ab118..adadc97e54875 100644 --- a/.github/actions/prepare-for-tests/action.yml +++ b/.github/actions/prepare-for-tests/action.yml @@ -3,6 +3,9 @@ description: 'Prepares the environment for running Emscripten tests' runs: using: "composite" steps: + - name: Install Basic Packages + uses: ./.github/actions/install-basic-packages + - name: Install Emsdk uses: emscripten-core/setup-emsdk@v16 with: @@ -35,12 +38,6 @@ runs: test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true shell: bash - - name: Install Linux dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build ccache - shell: bash - - name: Pip install run: python -m pip install -r requirements-dev.txt shell: bash diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 93fec8f8eb0df..6fb83a86caca8 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -75,10 +75,13 @@ jobs: test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true - - name: Install Linux dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build ccache + - name: Install Basic Packages + uses: ./.github/actions/install-basic-packages + + - name: Install ccache + run: sudo apt-get install -y ccache + shell: bash + - name: Pip install run: python -m pip install -r requirements-dev.txt From a5a6444d8676e3a4eb5bb5be0dafcb715e65b5bb Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 22:07:53 +0000 Subject: [PATCH 19/41] Add python to base packages, use with linters too --- .github/actions/install-basic-packages/action.yml | 9 ++++++++- .github/workflows/build-and-test-linux.yml | 10 +++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/actions/install-basic-packages/action.yml b/.github/actions/install-basic-packages/action.yml index d30b5469572ae..8e148c75ccd8b 100644 --- a/.github/actions/install-basic-packages/action.yml +++ b/.github/actions/install-basic-packages/action.yml @@ -1,10 +1,17 @@ name: 'Install Basic Packages' -description: 'Installs xz and ninja-build' +description: 'Installs packages missing from GHA runner base' runs: using: 'composite' steps: + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install packages run: | sudo apt-get update sudo apt-get install -y xz-utils ninja-build shell: bash + + diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 6fb83a86caca8..92d57ae99e7ea 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -298,15 +298,15 @@ jobs: path: out/test-results.xml linters: - runs-on: ubuntu-latest + runs-on: emscripten-premerge-linux-runners steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' + - name: Install Basic Packages + uses: ./.github/actions/install-basic-packages + + - name: Setup Node.js uses: actions/setup-node@v4 From 7273f6c86383912d603936c3ffaf6847fdf0ccf7 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 22:19:13 +0000 Subject: [PATCH 20/41] add cmake, run build-linux on premerge --- .github/actions/install-basic-packages/action.yml | 2 +- .github/workflows/build-and-test-linux.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/install-basic-packages/action.yml b/.github/actions/install-basic-packages/action.yml index 8e148c75ccd8b..833b3969f9189 100644 --- a/.github/actions/install-basic-packages/action.yml +++ b/.github/actions/install-basic-packages/action.yml @@ -11,7 +11,7 @@ runs: - name: Install packages run: | sudo apt-get update - sudo apt-get install -y xz-utils ninja-build + sudo apt-get install -y xz-utils ninja-build cmake shell: bash diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 92d57ae99e7ea..17f9f5841fbf7 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -20,7 +20,7 @@ permissions: jobs: build-linux: - runs-on: ubuntu-latest + runs-on: emscripten-premerge-linux-runners env: EMCC_CORES: "4" EMCC_USE_NINJA: "1" From 3a228ac900734e55ad849bd8e66e7a3077859eab Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 22:22:15 +0000 Subject: [PATCH 21/41] add wget --- .github/actions/install-basic-packages/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-basic-packages/action.yml b/.github/actions/install-basic-packages/action.yml index 833b3969f9189..19bb1fb429f6e 100644 --- a/.github/actions/install-basic-packages/action.yml +++ b/.github/actions/install-basic-packages/action.yml @@ -11,7 +11,7 @@ runs: - name: Install packages run: | sudo apt-get update - sudo apt-get install -y xz-utils ninja-build cmake + sudo apt-get install -y xz-utils ninja-build cmake wget shell: bash From c94a6cf6c0b8ea58d479f9f282785efad872070e Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 22:24:38 +0000 Subject: [PATCH 22/41] move basic packages up --- .github/workflows/build-and-test-linux.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 17f9f5841fbf7..38d5805d8d971 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -29,6 +29,9 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 + - name: Install Basic Packages + uses: ./.github/actions/install-basic-packages + - name: Get wasmer run: | wget https://github.com/wasmerio/wasmer/releases/download/v3.1.1/wasmer-linux-amd64.tar.gz @@ -75,14 +78,10 @@ jobs: test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> $EMSDK/.emscripten || true test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $($EMSDK/upstream/bin/clang -print-resource-dir) || true - - name: Install Basic Packages - uses: ./.github/actions/install-basic-packages - - name: Install ccache run: sudo apt-get install -y ccache shell: bash - - name: Pip install run: python -m pip install -r requirements-dev.txt From fec2df45698b344a685d10e2843b11124afa816e Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 22:42:34 +0000 Subject: [PATCH 23/41] remove unused node install --- .github/actions/install-node-newest/action.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/actions/install-node-newest/action.yml diff --git a/.github/actions/install-node-newest/action.yml b/.github/actions/install-node-newest/action.yml deleted file mode 100644 index ab8a344d5b32b..0000000000000 --- a/.github/actions/install-node-newest/action.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'Install Node Newest' -description: 'Installs Node v25.4.0' -runs: - using: "composite" - steps: - - name: Download Node - run: | - cd $HOME - wget https://nodejs.org/dist/v25.4.0/node-v25.4.0-linux-x64.tar.xz - tar xf node-v25.4.0-linux-x64.tar.xz - echo "NODE_JS_TEST = [os.path.expanduser('~/node-v25.4.0-linux-x64/bin/node')]" >> $EMSDK/.emscripten - echo "JS_ENGINES = [NODE_JS_TEST]" >> $EMSDK/.emscripten - echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> $EMSDK/.emscripten - cat $EMSDK/.emscripten - echo "/home/runner/node-v25.4.0-linux-x64/bin" >> $GITHUB_PATH - shell: bash From fee3634aef8e6bab51b4538dca58b4bdd9e62e2a Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 22:42:40 +0000 Subject: [PATCH 24/41] try windows --- .github/workflows/test-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 7f7d7e00483a8..36faaf368a5ee 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -13,7 +13,7 @@ permissions: jobs: test-windows: - runs-on: windows-2019 + runs-on: emscripten-premerge-windows-runners defaults: run: working-directory: 'path with spaces ()' From ee59cf5f79dd16b321fb4a25b8b3040cd206db9c Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 24 Apr 2026 23:04:06 +0000 Subject: [PATCH 25/41] add build-essential --- .github/actions/install-basic-packages/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-basic-packages/action.yml b/.github/actions/install-basic-packages/action.yml index 19bb1fb429f6e..05458fa1b80aa 100644 --- a/.github/actions/install-basic-packages/action.yml +++ b/.github/actions/install-basic-packages/action.yml @@ -11,7 +11,7 @@ runs: - name: Install packages run: | sudo apt-get update - sudo apt-get install -y xz-utils ninja-build cmake wget + sudo apt-get install -y xz-utils build-essential ninja-build cmake wget shell: bash From 869bef875c6ab6c3755b770d6ddeed2fc19bf6d7 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Sat, 25 Apr 2026 04:27:22 +0000 Subject: [PATCH 26/41] fix environment varaibles in chrome test --- .github/actions/run-tests-chrome/action.yml | 23 ++++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/actions/run-tests-chrome/action.yml b/.github/actions/run-tests-chrome/action.yml index ace4f53ceb008..1cb91b1a9edd1 100644 --- a/.github/actions/run-tests-chrome/action.yml +++ b/.github/actions/run-tests-chrome/action.yml @@ -20,23 +20,26 @@ runs: - name: Install Chrome uses: ./.github/actions/install-chrome - - name: Run browser tests + - name: Set environment variables run: | - export EMTEST_DETECT_TEMPFILE_LEAKS="0" - export EMTEST_HEADLESS="1" - export EMTEST_BROWSER="/usr/bin/google-chrome" - export EMTEST_CORES="2" - export EM_FROZEN_CACHE="" - export EMTEST_LACKS_WEBGPU="1" - export EMTEST_LACKS_SOUND_HARDWARE="1" + echo "EMTEST_DETECT_TEMPFILE_LEAKS=0" >> $GITHUB_ENV + echo "EMTEST_HEADLESS=1" >> $GITHUB_ENV + echo "EMTEST_BROWSER=/usr/bin/google-chrome" >> $GITHUB_ENV + echo "EMTEST_CORES=2" >> $GITHUB_ENV + echo "EM_FROZEN_CACHE=" >> $GITHUB_ENV + echo "EMTEST_LACKS_WEBGPU=1" >> $GITHUB_ENV + echo "EMTEST_LACKS_SOUND_HARDWARE=1" >> $GITHUB_ENV if [ "${{ inputs.visualize }}" = "true" ]; then - export EMTEST_VISUALIZE="1" + echo "EMTEST_VISUALIZE=1" >> $GITHUB_ENV fi + shell: bash - ./test/runner ${{ inputs.test_targets }} + - name: Run browser tests + run: ./test/runner ${{ inputs.test_targets }} shell: bash + - name: Check profile if: inputs.visualize == 'true' run: test -s out/graph.html From ebef4e26be94fe3f3211bb0fee4af6b659904ea5 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Sat, 25 Apr 2026 04:58:56 +0000 Subject: [PATCH 27/41] update action versions --- .../actions/install-basic-packages/action.yml | 2 +- .github/workflows/build-and-test-linux.yml | 24 +++++++++---------- .github/workflows/test-windows.yml | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/actions/install-basic-packages/action.yml b/.github/actions/install-basic-packages/action.yml index 05458fa1b80aa..9579db823cfc6 100644 --- a/.github/actions/install-basic-packages/action.yml +++ b/.github/actions/install-basic-packages/action.yml @@ -4,7 +4,7 @@ runs: using: 'composite' steps: - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6.2.0 with: python-version: '3.10' diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 38d5805d8d971..8e9509a8d376a 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -27,7 +27,7 @@ jobs: EM_COMPILER_WRAPPER: "ccache" steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Install Basic Packages uses: ./.github/actions/install-basic-packages @@ -112,7 +112,7 @@ jobs: EMCC_CORES: "4" steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Prepare for tests uses: ./.github/actions/prepare-for-tests @@ -135,7 +135,7 @@ jobs: EMTEST_SKIP_NODE_25: "1" steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Prepare for tests uses: ./.github/actions/prepare-for-tests @@ -157,7 +157,7 @@ jobs: EMCC_CORES: 4 steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Prepare for tests uses: ./.github/actions/prepare-for-tests @@ -194,7 +194,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Run browser chrome tests uses: ./.github/actions/run-tests-chrome @@ -207,7 +207,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Run browser64 tests uses: ./.github/actions/run-tests-chrome @@ -221,7 +221,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Run browser_2gb tests uses: ./.github/actions/run-tests-chrome @@ -234,7 +234,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Run browser64_4gb tests uses: ./.github/actions/run-tests-chrome @@ -247,7 +247,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Run sockets tests uses: ./.github/actions/run-tests-chrome @@ -266,7 +266,7 @@ jobs: EMTEST_SKIP_NEW_CMAKE: "1" steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Prepare for tests uses: ./.github/actions/prepare-for-tests @@ -300,7 +300,7 @@ jobs: runs-on: emscripten-premerge-linux-runners steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 - name: Install Basic Packages uses: ./.github/actions/install-basic-packages @@ -308,7 +308,7 @@ jobs: - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6.3.0 with: node-version: '24.13.1' diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 36faaf368a5ee..ff9d6de2bb172 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -33,7 +33,7 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 with: path: 'path with spaces ()' From efe6506068fbd4b907c3caf48d0c29a6c5864b06 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Sat, 25 Apr 2026 05:20:27 +0000 Subject: [PATCH 28/41] try windows github runner again --- .github/workflows/test-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index ff9d6de2bb172..53b724e6ff42f 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -13,7 +13,7 @@ permissions: jobs: test-windows: - runs-on: emscripten-premerge-windows-runners + runs-on: windows-2022 defaults: run: working-directory: 'path with spaces ()' From 8fd4effb9ac533ac069c0644e7bef6f6b649ae46 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Sat, 25 Apr 2026 05:46:57 +0000 Subject: [PATCH 29/41] try chrome on runners --- .github/workflows/build-and-test-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 8e9509a8d376a..93405d1b6c50f 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -190,7 +190,7 @@ jobs: path: out/test-results.xml test-browser-chrome: - needs: build-linux + needs: emscripten-premerge-linux-runners runs-on: ubuntu-latest steps: - name: Checkout repo From 8fe10c24aeeedb5e222cdfea16432db296056b00 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Sun, 26 Apr 2026 22:14:56 +0000 Subject: [PATCH 30/41] fix chrome --- .github/workflows/build-and-test-linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 93405d1b6c50f..7fa80cc96193d 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -190,8 +190,8 @@ jobs: path: out/test-results.xml test-browser-chrome: - needs: emscripten-premerge-linux-runners - runs-on: ubuntu-latest + needs: build-linux + runs-on: emscripten-premerge-linux-runners steps: - name: Checkout repo uses: actions/checkout@v6.0.2 From 4ac898f3dace320f33a3d92df4b42416b3165aff Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Sun, 26 Apr 2026 23:10:31 +0000 Subject: [PATCH 31/41] install chrome with apt to get deps --- .github/actions/install-chrome/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-chrome/action.yml b/.github/actions/install-chrome/action.yml index 4fdcb796deecd..52608ee438161 100644 --- a/.github/actions/install-chrome/action.yml +++ b/.github/actions/install-chrome/action.yml @@ -12,7 +12,7 @@ runs: sudo apt-get update sudo apt-get install -q -y libu2f-udev libvulkan1 xdg-utils wget -O ~/chrome.deb https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb - sudo dpkg -i ~/chrome.deb + sudo apt install ~/chrome.deb echo "Chrome version:" /usr/bin/google-chrome --version fi From 87f20e578bb347d036974eebb07a85aa7b638542 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Sun, 26 Apr 2026 23:12:41 +0000 Subject: [PATCH 32/41] install ccache --- .github/actions/install-basic-packages/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-basic-packages/action.yml b/.github/actions/install-basic-packages/action.yml index 9579db823cfc6..b53abe6912b11 100644 --- a/.github/actions/install-basic-packages/action.yml +++ b/.github/actions/install-basic-packages/action.yml @@ -11,7 +11,7 @@ runs: - name: Install packages run: | sudo apt-get update - sudo apt-get install -y xz-utils build-essential ninja-build cmake wget + sudo apt-get install -y xz-utils build-essential ninja-build cmake wget ccache shell: bash From ba4a757f4e0976d79a38e01ee2bd5736e4d32f24 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 27 Apr 2026 17:25:05 +0000 Subject: [PATCH 33/41] always yes --- .github/actions/install-chrome/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-chrome/action.yml b/.github/actions/install-chrome/action.yml index 52608ee438161..57cdfd7a7dcfb 100644 --- a/.github/actions/install-chrome/action.yml +++ b/.github/actions/install-chrome/action.yml @@ -12,7 +12,7 @@ runs: sudo apt-get update sudo apt-get install -q -y libu2f-udev libvulkan1 xdg-utils wget -O ~/chrome.deb https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb - sudo apt install ~/chrome.deb + sudo apt install -y ~/chrome.deb echo "Chrome version:" /usr/bin/google-chrome --version fi From 49fafc654a97fd7553e3bc0807905228c192a75d Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 27 Apr 2026 20:22:09 +0000 Subject: [PATCH 34/41] more small runners --- .github/workflows/build-and-test-linux.yml | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 7fa80cc96193d..9f30879648156 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -296,6 +296,116 @@ jobs: name: test-results-other path: out/test-results.xml + build-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v6.0.2 + + - name: Setup Python + uses: actions/setup-python@v6.2.0 + with: + python-version: '3.10' + + - name: Pip install + run: python -m pip install -r requirements-dev.txt + shell: bash + + - name: Update settings docs check + run: tools/maint/update_settings_docs.py --check + shell: bash + + - name: Make site text + run: make -C site text + shell: bash + + - name: Check emcc help text + run: tools/maint/check_emcc_help_text.py + shell: bash + + - name: Make site html + run: make -C site html + shell: bash + + test-modularize-instance: + needs: build-linux + runs-on: ubuntu-latest + env: + EMTEST_SKIP_NODE_25: "1" + steps: + - name: Checkout repo + uses: actions/checkout@v6.0.2 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Run modularize instance tests + run: ./test/runner instance + shell: bash + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-modularize-instance + path: out/test-results.xml + + test-stress: + needs: build-linux + runs-on: ubuntu-latest + env: + EMTEST_SKIP_NODE_25: "1" + steps: + - name: Checkout repo + uses: actions/checkout@v6.0.2 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Run stress tests + run: ./test/runner stress + shell: bash + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-stress + path: out/test-results.xml + + test-esm-integration: + needs: build-linux + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v6.0.2 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Reinstall V8 + run: rm -rf $HOME/.jsvu + shell: bash + + - name: Install V8 + uses: ./.github/actions/install-v8 + + - name: Install Node newest + uses: ./.github/actions/install-node + with: + node_version: newest + + - name: Run esm_integration tests + run: ./test/runner esm_integration + shell: bash + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-esm-integration + path: out/test-results.xml + linters: runs-on: emscripten-premerge-linux-runners steps: From 3d9062601a92056a8e7d64156d9fd5959af96688 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 27 Apr 2026 20:23:47 +0000 Subject: [PATCH 35/41] remove result uploads --- .github/actions/run-tests-chrome/action.yml | 8 ---- .github/workflows/build-and-test-linux.yml | 49 +++------------------ 2 files changed, 7 insertions(+), 50 deletions(-) diff --git a/.github/actions/run-tests-chrome/action.yml b/.github/actions/run-tests-chrome/action.yml index 1cb91b1a9edd1..0f1dbd04a7282 100644 --- a/.github/actions/run-tests-chrome/action.yml +++ b/.github/actions/run-tests-chrome/action.yml @@ -44,11 +44,3 @@ runs: if: inputs.visualize == 'true' run: test -s out/graph.html shell: bash - - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-${{ inputs.title }} - path: out/test-results.xml - diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 9f30879648156..b72981dc39160 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -120,12 +120,7 @@ jobs: - name: Run sanity tests run: ./test/runner sanity - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-sanity - path: out/test-results.xml + test-core0: needs: build-linux @@ -143,12 +138,7 @@ jobs: - name: Run core0 tests run: ./test/runner core0 - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-core0 - path: out/test-results.xml + test-wasm64-4gb: needs: build-linux @@ -182,12 +172,7 @@ jobs: run: ./test/runner wasm64_4gb shell: bash - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-wasm64-4gb - path: out/test-results.xml + test-browser-chrome: needs: build-linux @@ -289,12 +274,7 @@ jobs: run: ./test/runner benchmark.test_primes shell: bash - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-other - path: out/test-results.xml + build-docs: runs-on: ubuntu-latest @@ -343,12 +323,7 @@ jobs: run: ./test/runner instance shell: bash - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-modularize-instance - path: out/test-results.xml + test-stress: needs: build-linux @@ -366,12 +341,7 @@ jobs: run: ./test/runner stress shell: bash - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-stress - path: out/test-results.xml + test-esm-integration: needs: build-linux @@ -399,12 +369,7 @@ jobs: run: ./test/runner esm_integration shell: bash - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-esm-integration - path: out/test-results.xml + linters: runs-on: emscripten-premerge-linux-runners From d17ffa221e7a04c9895934294c7141e302350ac9 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 27 Apr 2026 21:21:00 +0000 Subject: [PATCH 36/41] core2, core3, wasm64=misc --- .github/workflows/build-and-test-linux.yml | 210 +++++++++++++++++++++ 1 file changed, 210 insertions(+) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index b72981dc39160..88ba805e42b30 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -174,6 +174,216 @@ jobs: + test-core2: + needs: build-linux + runs-on: ubuntu-latest + env: + EMTEST_BROWSER: "node" + EMTEST_SKIP_NODE_25: "1" + steps: + - name: Checkout repo + uses: actions/checkout@v6.0.2 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Run asan+lsan tests + run: | + ./test/runner \ + asan.test_stat \ + asan.test_stack \ + asan.test_float_builtins \ + asan.test_embind* \ + asan.test_abort_on_exceptions \ + asan.test_ubsan_full_left_shift_fsanitize_integer \ + asan.test_pthread* \ + asan.test_dyncall_specific_minimal_runtime \ + asan.test_async_hello \ + asan.test_dlfcn_basic \ + asan.test_async_hello_jspi \ + asan.test_cubescript \ + asan.test_externref_emjs_dynlink \ + asan.test_asyncify_longjmp \ + asan.test_pthread_run_on_main_thread \ + asan.test_minimal_runtime_global_initializer \ + asan.test_fs_js_api_wasmfs \ + asan.test_modularize_instance_pthreads \ + asan.test_minimal_runtime_hello_world \ + asan.test_select_blocking \ + asan.test_ppoll_blocking \ + lsan.test_dylink_dso_needed \ + lsan.test_stdio_locking \ + lsan.test_dlfcn_basic \ + lsan.test_pthread_create \ + lsan.test_pthread_exit_main_stub \ + lsan.test_dylink_iostream \ + lsan.test_embind_lib_with_asyncify \ + ubsan.test_dlfcn_self \ + ubsan.test_externref_emjs_dynlink + shell: bash + + - name: Run core2+extras tests + run: | + ./test/runner \ + core2 \ + browser.test_pthread_join \ + corez.test_dylink_syslibs_all + shell: bash + + test-core3: + needs: build-linux + runs-on: ubuntu-latest + env: + EMTEST_SKIP_NODE_25: "1" + steps: + - name: Checkout repo + uses: actions/checkout@v6.0.2 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Run core3+extras tests + run: | + ./test/runner \ + lto2.test_dylink_syslibs_all \ + lto2.test_float_builtins \ + lto2.test_avx_nontrapping \ + lto0.test_exceptions_allowed_uncaught \ + lto0.test_longjmp_standalone_standalone \ + lto0.test_embind_i64_val \ + lto0.test_wasm_worker_futex_wait \ + thinlto0.test_pthread_dlsym \ + core3 \ + core2g.test_externref \ + corez.test_dylink_iostream \ + core2ss.test_pthread_dylink \ + core2ss.test_pthread_thread_local_storage \ + core2ss.test_wasm_worker_futex_wait \ + core2s.test_dylink_syslibs_missing_assertions \ + core2s.test_module_wasm_memory \ + cores.test_minimal_runtime_safe_heap \ + wasm2js3.test_memorygrowth_2 \ + wasm2js2.test_pthread_proxying \ + wasmfs.test_hello_world \ + wasmfs.test_pipe_select \ + wasmfs.test_unistd_links* \ + wasmfs.test_atexit_standalone \ + wasmfs.test_emscripten_get_now \ + wasmfs.test_dyncall_specific_minimal_runtime \ + wasmfs.test_fcntl_misc \ + wasmfs.test_readdir_rawfs \ + wasmfs.test_utime \ + wasmfs.test_unistd_unlink \ + wasmfs.test_unistd_dup \ + wasmfs.test_unistd_access \ + wasmfs.test_unistd_close \ + wasmfs.test_unistd_truncate \ + wasmfs.test_readdir \ + wasmfs.test_readdir_unlink \ + wasmfs.test_unistd_pipe \ + wasmfs.test_unistd_io \ + wasmfs.test_unistd_curdir \ + wasmfs.test_poll \ + wasmfs.test_fs_64bit \ + wasmfs.test_fs_write \ + wasmfs.test_fs_writev \ + wasmfs.test_fs_writev_rawfs \ + wasmfs.test_fs_readv \ + wasmfs.test_fs_write \ + wasmfs.test_fs_readv_rawfs \ + wasmfs.test_fs_nodefs_nofollow \ + wasmfs.test_fs_nodefs_readdir \ + wasmfs.test_fs_nodefs_home \ + wasmfs.test_fs_nodefs_cloexec \ + wasmfs.test_fs_nodefs_cloexec_rawfs \ + wasmfs.test_fs_errorstack \ + wasmfs.test_fs_errorstack_rawfs \ + wasmfs.test_fs_emptyPath \ + wasmfs.test_webidl \ + wasmfs.test_dlfcn_self \ + wasmfs.test_dlfcn_unique_sig \ + wasmfs.test_dylink_basics \ + wasmfs.test_exit_status \ + wasmfs.test_minimal_runtime_memorygrowth \ + wasmfs.test_mmap_anon* \ + wasmfs.test_mount \ + wasmfs.test_getcwd_with_non_ascii_name \ + wasmfs.test_stat \ + wasmfs.test_fstatat \ + wasmfs.test_futimens \ + wasmfs.test_unistd_links \ + wasmfs.test_fcntl_open \ + wasmfs.test_fs_llseek \ + wasmfs.test_fs_llseek_rawfs \ + wasmfs.test_freetype \ + wasmfs.test_unistd_close_rawfs \ + minimal0.test_utf \ + minimal0.test_ubsan_full_stack_trace_gsource_map \ + minimal0.test_static_variable \ + minimal0.test_stack_overflow \ + omitexports0.test_asyncify_longjmp \ + omitexports0.test_emscripten_api \ + strict.test_no_declare_asm_module_exports \ + strict.test_dylink_global_inits_reversed + shell: bash + + test-wasm64-misc: + needs: build-linux + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v6.0.2 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Reinstall V8 + run: rm -rf $HOME/.jsvu + shell: bash + + - name: Install V8 + uses: ./.github/actions/install-v8 + + - name: Install Node newest + uses: ./.github/actions/install-node + with: + node_version: newest + + - name: Configure Node v25 + run: echo "NODE_JS = NODE_JS_TEST" >> $EMSDK/.emscripten + shell: bash + + - name: Run wasm64 misc tests + run: | + ./test/runner \ + other.*_wasm64 \ + core_2gb.test_*em_asm* \ + core_2gb.test_*embind* \ + core_2gb.test_fs_js_api_wasmfs \ + wasm64.test_safe_stack \ + wasm64l.test_hello_world \ + wasm64l.test_bigswitch \ + wasm64l.test_module_wasm_memory \ + wasm64l.test_longjmp2_emscripten \ + wasm64l.test_embind_val_basics_legacy + shell: bash + + test-wasm2js1: + needs: build-linux + runs-on: ubuntu-latest + env: + EMTEST_SKIP_NODE_25: "1" + steps: + - name: Checkout repo + uses: actions/checkout@v6.0.2 + + - name: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - name: Run wasm2js1 tests + run: ./test/runner wasm2js1 + shell: bash + test-browser-chrome: needs: build-linux runs-on: emscripten-premerge-linux-runners From 93e338331b674465e6669df39155f556c71140e6 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 27 Apr 2026 22:00:35 +0000 Subject: [PATCH 37/41] try more on runners --- .github/workflows/build-and-test-linux.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 88ba805e42b30..9b08765eec544 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -142,7 +142,7 @@ jobs: test-wasm64-4gb: needs: build-linux - runs-on: ubuntu-latest + runs-on: emscripten-premerge-linux-runners env: EMCC_CORES: 4 steps: @@ -176,7 +176,7 @@ jobs: test-core2: needs: build-linux - runs-on: ubuntu-latest + runs-on: emscripten-premerge-linux-runners env: EMTEST_BROWSER: "node" EMTEST_SKIP_NODE_25: "1" @@ -232,7 +232,7 @@ jobs: test-core3: needs: build-linux - runs-on: ubuntu-latest + runs-on: emscripten-premerge-linux-runners env: EMTEST_SKIP_NODE_25: "1" steps: @@ -452,7 +452,7 @@ jobs: test-other: needs: build-linux - runs-on: ubuntu-latest + runs-on: emscripten-premerge-linux-runners env: EMCC_CORES: "4" EMTEST_SKIP_NODE_25: "1" From c658337cbead230f613cea1e6b86431c44c9bb6e Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 27 Apr 2026 23:43:42 +0000 Subject: [PATCH 38/41] install rustup --- .github/workflows/build-and-test-linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 9b08765eec544..3247b771d290f 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -466,10 +466,10 @@ jobs: - name: Prepare for tests uses: ./.github/actions/prepare-for-tests - - name: Install Scons + - name: Install Scons and rustup run: | sudo apt-get update - sudo apt-get install -y scons + sudo apt-get install -y scons rustup shell: bash - name: Setup Rust target From c3f58dee617251b8be82c08318108dac8d21281b Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 27 Apr 2026 23:55:57 +0000 Subject: [PATCH 39/41] rustup stable --- .github/workflows/build-and-test-linux.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index 3247b771d290f..bb667ff5bfae9 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -473,7 +473,9 @@ jobs: shell: bash - name: Setup Rust target - run: rustup target add wasm32-unknown-emscripten + run: | + rustup default stable + rustup target add wasm32-unknown-emscripten shell: bash - name: Run other and jslib tests From 3b13332539a93af9d47bf2ebb039ca1af68903fd Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 28 Apr 2026 00:07:41 +0000 Subject: [PATCH 40/41] update upload, cancel-in-progress --- .github/workflows/build-and-test-linux.yml | 6 +++++- .github/workflows/test-windows.yml | 7 ------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index bb667ff5bfae9..68846af4855ff 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -8,6 +8,10 @@ on: - main pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: LANG: "C.UTF-8" EMSDK_NOTTY: "1" @@ -100,7 +104,7 @@ jobs: run: tar -czf ~/emscripten-cache.tar.gz -C ~/ .jsvu cache vms wasi-sdk - name: Persist workspace - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7.0.1 with: name: emscripten-cache path: ~/emscripten-cache.tar.gz diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 53b724e6ff42f..6d8e812ce02fd 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -69,10 +69,3 @@ jobs: - name: Sockets tests run: test/runner.bat sockets.test_nodejs_sockets_echo* - - - name: Upload test results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results-windows - path: 'path with spaces ()/out/test-results.xml' From d9b5214a74118d8535458b131a9ede2de190a4a1 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 28 Apr 2026 00:32:37 +0000 Subject: [PATCH 41/41] try tracking test duration --- test/parallel_testsuite.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/parallel_testsuite.py b/test/parallel_testsuite.py index 9363dd5152b68..3b6e48f95439a 100644 --- a/test/parallel_testsuite.py +++ b/test/parallel_testsuite.py @@ -72,6 +72,8 @@ def run_test(args): result._mirrorOutput = False finally: result.elapsed = time.perf_counter() - start_time + result.test_duration = result.elapsed + # Before attempting to delete the tmp dir make sure the current # working directory is not within it.