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: 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/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..2790bd26ab118 --- /dev/null +++ b/.github/actions/prepare-for-tests/action.yml @@ -0,0 +1,50 @@ +name: 'Prepare for Tests' +description: 'Prepares the environment for running Emscripten tests' +runs: + using: "composite" + steps: + - 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# 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 new file mode 100644 index 0000000000000..aac12dec788dd --- /dev/null +++ b/.github/workflows/build-and-test-linux.yml @@ -0,0 +1,233 @@ +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 + uses: ./.github/actions/install-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: Prepare for tests + uses: ./.github/actions/prepare-for-tests + + - 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 + env: + 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: 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 + runs-on: ubuntu-latest + env: + EMCC_CORES: 4 + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - 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_4gb tests + 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 + 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 + 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'