-
Notifications
You must be signed in to change notification settings - Fork 121
chore(ci): separate windows runs #1543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vados-cosmonic
merged 2 commits into
bytecodealliance:main
from
vados-cosmonic:chore(ci)=run-windows-only-on-release-prs
May 22, 2026
+293
−27
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,291 @@ | ||
| # | ||
| # 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: "latest" | ||
|
|
||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||
| with: | ||
| version: 11 | ||
|
|
||
| - name: Install Rust | ||
| run: rustup update stable --no-self-update | ||
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | ||
| with: | ||
| shared-key: jco-${{ hashFiles('Cargo.lock') }} | ||
|
|
||
| - name: Enable sccache | ||
| uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 | ||
|
|
||
| - name: Setup sccache | ||
| run: | | ||
| echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | ||
| echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | ||
|
|
||
| - name: Cache node modules | ||
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | ||
| with: | ||
| key: node-modules-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package-lock.json') }} | ||
| path: | | ||
| node_modules | ||
|
|
||
| - name: Install node modules | ||
| run: pnpm install | ||
|
|
||
| - 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 output | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: build | ||
| path: packages/jco/obj | ||
|
|
||
| - name: Upload artifacts for js tests | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: js-generated-tests | ||
| path: packages/jco/test/output | ||
|
|
||
| - name: Build jco-transpile | ||
| run: pnpm --filter '@bytecodealliance/jco-transpile' run build | ||
|
|
||
| - name: Upload jco-transpile vendor | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: jco-transpile-vendor | ||
| path: | | ||
| packages/jco-transpile/vendor | ||
|
|
||
| test-jco: | ||
| if: ${{ startsWith(github.event.pull_request.title, 'release:') }} | ||
| runs-on: ${{ matrix.os }} | ||
| permissions: | ||
| contents: read | ||
| needs: | ||
| - build | ||
| strategy: | ||
| matrix: | ||
| os: | ||
| - windows-2025 | ||
| node: | ||
| - 20.x | ||
| - 22.x | ||
| - 24.x | ||
| - latest # 26.x | ||
| include: | ||
| - os: windows-2025 | ||
| weval-bin-path: .weval-bin/weval.exe | ||
| - os: ubuntu-22.04 | ||
| weval-bin-path: .weval-bin/weval | ||
| - os: macos-latest | ||
| weval-bin-path: .weval-bin/weval | ||
| exclude: | ||
| - os: macos-latest | ||
| node: 20.x | ||
| - os: windows-2025 | ||
| node: latest | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
|
|
||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||
| with: | ||
| version: 11 | ||
|
|
||
| - uses: taiki-e/cache-cargo-install-action@417450f3c33ee20393705369577571770643d4c7 # v3.0.7 | ||
| with: | ||
| tool: wasm-tools@1.244.0 | ||
|
|
||
| # Determine weval version | ||
| - name: Determine weval version | ||
| id: weval-meta | ||
| run: | | ||
| export WEVAL_LATEST_URL=`curl -Ls -o /dev/null -w %{url_effective} https://github.com/bytecodealliance/weval/releases/latest` | ||
| 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@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | ||
| 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@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | ||
| with: | ||
| key: puppeteer-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('packages/jco/package.json') }} | ||
| path: | | ||
| /c/users/runneradmin/.cache/puppeteer | ||
|
|
||
| # NOTE: We can stop pinning the version of puppeteer when the version that the mac atttempts to use | ||
| # syncs up (right now newest is 148.0.7778.178, but puppeteer will attempt to use 148.0.7778.97) | ||
| - name: Install puppeteer (pinned) | ||
| if: ${{ matrix.node == 'latest' }} | ||
| run: | | ||
| export PUPPETEER_VERSION=148.0.7778.97 | ||
| pnpm run test:setup:puppeteer | ||
|
|
||
| - name: Install puppeteer | ||
| if: ${{ matrix.node != 'latest' }} | ||
| run: | | ||
| pnpm run test:setup:puppeteer | ||
|
|
||
| - name: Restore jco build output | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: build | ||
| path: packages/jco/obj | ||
|
|
||
| - name: Restore artifacts for JS tests | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: js-generated-tests | ||
| path: packages/jco/test/output | ||
|
|
||
| - 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 | ||
| node: | ||
| - 20.x | ||
| - 22.x | ||
| - 24.x | ||
| - latest | ||
| exclude: | ||
| # TODO: windows conformance tests hang periodically | ||
| - os: windows-2025 | ||
| node: 20.x | ||
| - os: windows-2025 | ||
| node: 22.x | ||
| - os: windows-2025 | ||
| node: 24.x | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| submodules: recursive | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| 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@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
|
|
||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||
| with: | ||
| version: 11 | ||
|
|
||
| - name: Cache node modules | ||
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | ||
| with: | ||
| key: node-modules-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package-lock.json') }} | ||
| path: | | ||
| node_modules | ||
|
|
||
| - name: Restore jco build output | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: build | ||
| path: packages/jco/obj | ||
|
|
||
| - name: Restore artifacts for JS tests | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: js-generated-tests | ||
| path: packages/jco/test/output | ||
|
|
||
| - 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_ | ||
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.