Repository navigation
fix(transpile): preserve Unicode core export names in asm.js #1774
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # This file contains tests that only run on windows, and is otherwise identical | |
| # to main.yml. | |
| # | |
| # Windows tests have been relegated to this file because they are incredibly slow | |
| # in GH actions, and inconsistently hang. | |
| # | |
| # Until those problems are fixed, this workflow should be run against release PRs | |
| # | |
| name: main-windows | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| defaults: | |
| run: | |
| shell: bash | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| build: | |
| if: ${{ startsWith(github.event.pull_request.title, 'release:') }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | |
| with: | |
| node-version: "latest" | |
| - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| with: | |
| version: 11 | |
| - name: Install Rust | |
| run: rustup update stable --no-self-update | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | |
| with: | |
| shared-key: jco-${{ hashFiles('Cargo.lock') }} | |
| - name: Enable sccache | |
| uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11 | |
| - name: Setup sccache | |
| run: | | |
| echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV" | |
| echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV" | |
| - name: Cache node modules | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| key: node-modules-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| path: | | |
| node_modules | |
| - name: Install node modules | |
| run: pnpm install | |
| - name: Build and test Component Model runtime | |
| run: | | |
| pnpm --filter '@bytecodealliance/jco-cm-runtime' run build | |
| pnpm --filter '@bytecodealliance/jco-cm-runtime' run test | |
| - name: Upload Component Model runtime build output | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: jco-cm-runtime-dist | |
| path: packages/jco-cm-runtime/dist | |
| - name: Build jco for test | |
| working-directory: packages/jco | |
| run: | | |
| pnpm --filter '@bytecodealliance/jco' run build | |
| pnpm --filter '@bytecodealliance/jco' run build:test:components | |
| - name: Upload jco build transpiled output | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: jco-build-transpiled | |
| path: packages/jco/obj | |
| - name: Upload jco build TS output | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: jco-build-ts | |
| path: packages/jco/dist | |
| - name: Upload artifacts for js tests | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: js-generated-tests | |
| path: packages/jco-transpile/test/fixtures/generated | |
| - name: Build jco-transpile | |
| run: pnpm --filter '@bytecodealliance/jco-transpile' run build | |
| - name: Upload jco-transpile vendor | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: jco-transpile-vendor | |
| path: | | |
| packages/jco-transpile/vendor | |
| - name: Build preview2-shim | |
| run: pnpm --filter '@bytecodealliance/preview2-shim' run build | |
| - name: Upload preview2-shim build output | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: build-preview2-shim | |
| path: packages/preview2-shim/dist | |
| test-jco: | |
| if: ${{ startsWith(github.event.pull_request.title, 'release:') }} | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| needs: | |
| - build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - windows-2025 | |
| - windows-latest | |
| node: | |
| - 22.x | |
| - 24.x | |
| - latest # 26.x | |
| include: | |
| - os: windows-2025 | |
| weval-bin-path: .weval-bin/weval.exe | |
| - os: windows-latest | |
| weval-bin-path: .weval-bin/weval.exe | |
| exclude: | |
| - os: windows-2025 | |
| node: latest | |
| - os: windows-latest | |
| node: latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| with: | |
| version: 11 | |
| - uses: taiki-e/cache-cargo-install-action@9ee83daaa7b96a6fab930949ecf1122bba04a389 # v3.0.8 | |
| with: | |
| tool: wasm-tools@1.244.0 | |
| # Determine weval version | |
| - name: Determine weval version | |
| id: weval-meta | |
| run: | | |
| WEVAL_LATEST_URL="$(curl -Ls -o /dev/null -w %\{url_effective\} https://github.com/bytecodealliance/weval/releases/latest)" | |
| export WEVAL_LATEST_URL; | |
| export WEVAL_VERSION="${WEVAL_LATEST_URL#https://github.com/bytecodealliance/weval/releases/tag/}" | |
| echo -e "version=$WEVAL_VERSION" >> "$GITHUB_OUTPUT" | |
| # Use cached weval bin if present | |
| - name: Cache weval bin | |
| id: cache-weval-bin | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: .weval-bin | |
| key: weval-bin-${{ steps.weval-meta.outputs.version }}-${{ matrix.os }} | |
| # (no cached weval bin) download weval release | |
| - if: ${{ steps.cache-weval-bin.outputs.cache-hit != 'true' && startsWith(matrix.os, 'windows') }} | |
| env: | |
| WEVAL_VERSION: ${{ steps.weval-meta.outputs.version }} | |
| run: | | |
| curl -LO "https://github.com/bytecodealliance/weval/releases/download/${WEVAL_VERSION}/weval-${WEVAL_VERSION}-x86_64-windows.zip" | |
| unzip "weval-${WEVAL_VERSION}-x86_64-windows.zip" | |
| mv "weval-${WEVAL_VERSION}-x86_64-windows" .weval-bin | |
| - name: Install NPM packages | |
| run: pnpm install | |
| - name: Cache puppeteer install | |
| if: ${{ startsWith(matrix.os, 'windows') }} | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| key: puppeteer-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| path: | | |
| /c/users/runneradmin/.cache/puppeteer | |
| - name: Install puppeteer | |
| run: | | |
| pnpm run test:setup:puppeteer | |
| - name: Restore jco build transpilation output | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| with: | |
| name: jco-build-transpiled | |
| path: packages/jco/obj | |
| - name: Restore jco TS build output | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| with: | |
| name: jco-build-ts | |
| path: packages/jco/dist | |
| - name: Restore Component Model runtime build output | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: jco-cm-runtime-dist | |
| path: packages/jco-cm-runtime/dist | |
| - name: Restore artifacts for JS tests | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| with: | |
| name: js-generated-tests | |
| path: packages/jco-transpile/test/fixtures/generated | |
| - name: Restore preview2-shim build output | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| with: | |
| name: build-preview2-shim | |
| path: packages/preview2-shim/dist | |
| # The runtime integration tests exercise the local transpiler through the API and CLI. | |
| - name: Restore jco-transpile vendor | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: jco-transpile-vendor | |
| path: packages/jco-transpile/vendor | |
| - name: Build workspace jco-transpile | |
| run: pnpm --filter '@bytecodealliance/jco-transpile' run build:ts | |
| - name: Build workspace jco-std | |
| run: pnpm --filter '@bytecodealliance/jco-std' run build:ts | |
| - name: Test LTS Node.js | |
| if: matrix.node != 'latest' | |
| working-directory: packages/jco | |
| run: | | |
| pnpm --filter '@bytecodealliance/jco' run test:lts -- --maxWorkers 4 --minWorkers 2 --maxConcurrency 2 | |
| - name: Test Latest Node.js | |
| if: matrix.node == 'latest' | |
| working-directory: packages/jco | |
| env: | |
| WEVAL_BIN_PATH: ${{ matrix.weval-bin-path }} | |
| run: | | |
| pnpm --filter '@bytecodealliance/jco' run test -- --maxWorkers 4 --minWorkers 2 --maxConcurrency 2 | |
| test-wasi-node: | |
| if: ${{ startsWith(github.event.pull_request.title, 'release:') }} | |
| needs: | |
| - build | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - windows-2025 | |
| - windows-latest | |
| node: | |
| - 22.x | |
| - 24.x | |
| - latest | |
| exclude: | |
| # TODO: windows conformance tests hang periodically | |
| - os: windows-2025 | |
| node: 22.x | |
| - os: windows-2025 | |
| node: 24.x | |
| - os: windows-2025 | |
| node: latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| - name: Install Rust deps | |
| run: | | |
| rustup update stable --no-self-update && rustup default stable | |
| rustup target add wasm32-unknown-unknown | |
| rustup target add wasm32-wasip1 | |
| - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| with: | |
| version: 11 | |
| - name: Restore jco build transpilation output | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| with: | |
| name: jco-build-transpiled | |
| path: packages/jco/obj | |
| - name: Restore jco TS build output | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| with: | |
| name: jco-build-ts | |
| path: packages/jco/dist | |
| - name: Restore Component Model runtime build output | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: jco-cm-runtime-dist | |
| path: packages/jco-cm-runtime/dist | |
| - name: Restore artifacts for JS tests | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| with: | |
| name: js-generated-tests | |
| path: packages/jco-transpile/test/fixtures/generated | |
| - name: Restore preview2-shim build output | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| with: | |
| name: build-preview2-shim | |
| path: packages/preview2-shim/dist | |
| # Restoring node_modules can leave pnpm's Windows links incomplete while | |
| # pnpm install still reports that the workspace is already up to date. | |
| - name: Install node modules | |
| run: pnpm install | |
| - name: Generate tests | |
| run: | | |
| cargo xtask generate tests preview2 | |
| - name: WASI Preview 2 Conformance | |
| run: | | |
| cargo test node_ | |
| cargo test -p jco-tests --test mod \ | |
| generated::node_preview2_tcp \ | |
| -- --ignored --test-threads=1 |