add windows-11-arm to the build matrix #154
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
| name: Build cross platform | |
| permissions: | |
| contents: write | |
| # Controls when the action will run. Triggers the workflow on push | |
| on: | |
| push: | |
| branches: | |
| - '**' # Triggers on pushes to any branch | |
| tags: | |
| - 'v*' # Triggers on pushes of tags like v1.0, v20.15.10 | |
| pull_request: | |
| jobs: | |
| build: | |
| name: ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { | |
| name: "Windows Latest MSVC", | |
| os: windows-latest, | |
| artifact: win32-x64, | |
| } | |
| - { | |
| name: "Windows 11 ARM64", | |
| os: windows-11-arm, | |
| artifact: win32-arm64, | |
| } | |
| - { | |
| name: "Ubuntu_24_GCC", | |
| os: ubuntu-24.04, | |
| artifact: linux-x64, | |
| } | |
| - { | |
| name: "Ubuntu_24_ARM64", | |
| os: ubuntu-24.04-arm, | |
| artifact: linux-arm64, | |
| } | |
| - { | |
| name: "macOS Latest Clang", | |
| os: macos-latest, | |
| artifact: darwin-universal, | |
| } | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Use Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26.x' | |
| - name: Print env | |
| run: | | |
| echo github.event.action: ${{ github.event.action }} | |
| echo github.event_name: ${{ github.event_name }} | |
| echo github.ref: ${{ github.ref }} | |
| # x64 only. The arm64 image already ships node, cmake and ninja, and | |
| # choco would pull x64 builds of them onto an arm64 runner. | |
| - name: Install dependencies on windows | |
| if: matrix.config.artifact == 'win32-x64' | |
| run: | | |
| choco install node cmake | |
| node --version | |
| cmake --version | |
| "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" | |
| - name: Add msbuild to PATH | |
| if: startsWith(matrix.config.os, 'windows') | |
| uses: microsoft/setup-msbuild@v2 | |
| # x64 only. The arm64 image already has SDK 10.0.26100.0 installed, and | |
| # this action installs an x64 SDK. | |
| - name: Add setup Windows SDK | |
| if: matrix.config.artifact == 'win32-x64' | |
| uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 | |
| with: | |
| sdk-version: 26100 | |
| - name: Install dependencies on ubuntu | |
| if: startsWith(matrix.config.name, 'Ubuntu') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install cmake libxrandr-dev libxinerama-dev libxcursor-dev mesa-common-dev libx11-xcb-dev pkg-config nodejs npm mesa-vulkan-drivers libvulkan1 | |
| cmake --version | |
| gcc --version | |
| - name: Install dependencies on macos | |
| if: startsWith(matrix.config.os, 'macos') | |
| run: | | |
| brew install cmake | |
| cmake --version | |
| - name: Build | |
| shell: bash | |
| run: | | |
| npm ci | |
| echo "${{ github.event_name }}" | |
| npm run build | |
| - name: Test | |
| shell: bash | |
| env: | |
| WEBGPU_USE_CI_AVAILABLE_RENDERER: "1" | |
| run: | | |
| npm test | |
| # Named for the platform-arch alone so the package job can download | |
| # artifacts straight into dist/<platform-arch>/ without merging. Uploads | |
| # the whole directory so win32 carries its d3dcompiler_47.dll along. | |
| - name: Upload Artifact ⬆️ | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./dist/${{ matrix.config.artifact }}/* | |
| name: ${{ matrix.config.artifact }} | |
| overwrite: true | |
| # Release assets are a flat namespace, so give each one back its | |
| # platform-arch prefix rather than uploading four files named dawn.node. | |
| - name: Stage release asset | |
| if: startsWith(github.ref, 'refs/tags/') | |
| shell: bash | |
| run: cp dist/${{ matrix.config.artifact }}/dawn.node ${{ matrix.config.artifact }}.dawn.node | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: ${{ matrix.config.artifact }}.dawn.node | |
| package: | |
| needs: build | |
| name: package-and-publish | |
| environment: deploy | |
| permissions: | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Print env | |
| run: | | |
| echo github.event.action: ${{ github.event.action }} | |
| echo github.event_name: ${{ github.event_name }} | |
| echo github.ref: ${{ github.ref }} | |
| echo github.ref_type: ${{ github.ref_type }} | |
| # No merge-multiple: each artifact lands in dist/<its name>/, which is | |
| # exactly the per-platform-arch layout index.js resolves against. | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| - name: Build and Publish | |
| shell: bash | |
| run: | | |
| npm ci | |
| node build/prep-for-publish.js | |
| npm publish |