[github] Add binary releases via github actions Bug https://crbug.com/430624000. See also https://issues.chromium.org/issues/409590665#comment6. Here's an example of how the release would look: https://github.com/jacksonrl/dawn/releases/tag/v20251223.163459-jacksonrl.dawn.main The only difference is the name wouldn't have my name in it, which I think is autogenerated due to being a fork, and it would contain the macos/ios builds as well, which I disabled in my local version when testing due to low balance for macos runners (diff: https://github.com/jacksonrl/dawn/compare/7d88c22000b7d6941a7603851ac68d9f930c1947...e53c2d023762254bb7b884a13d5e9dd10b14d214) There are some ways we could improve the release outputs, but I wanted to make as minimal changes as possible to prevent any breakage as I cannot test all these platforms. Therefore this just uploads the output from the existing CI, which is mentioned in 409590665. These are nightly releases so nobody is expecting them to be stable, we can always improve this later Motivation: Many people end up needing graphics at some point. Having prebuilt binaries allows people to choose WebGPU more readily, which strengthens the WebGPU ecosystem (eg. more libraries made with wglsl) and also allows people to potentially port their code to web at a later point. This is an imported pull request from https://github.com/google/dawn/pull/55 GITHUB_PR_HEAD_SHA=a4d1c88a5614c1362cd6ee63f87d6352f3e6d9d3 ORIGINAL_AUTHOR=jacksonrl <203005141+jacksonrl@users.noreply.github.com> Bug: 430624000 GitOrigin-RevId: 250828284e3bbd38bc46f3cb062bc9c35b93047b Change-Id: I226a2a5c2b08c7bb881e7910b5c42ff4ca52ed3e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/282075 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d82d5a..ee7319a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml
@@ -5,6 +5,7 @@ branches: [ "main" ] pull_request: workflow_dispatch: + workflow_call: concurrency: # Use github.run_id on main branch @@ -219,13 +220,14 @@ if: matrix.arch == 'arm64-v8a' run: | cmake --install ${{ matrix.output_dir }} --prefix dawn-headers + cmake -E tar cvzf dawn-headers-${{ github.sha }}.tar.gz dawn-headers/ - name: Upload headers (from arm64-v8a build only) if: matrix.arch == 'arm64-v8a' uses: actions/upload-artifact@v4 with: name: dawn-headers-${{ github.sha }} - path: dawn-headers/ + path: dawn-headers-${{ github.sha }}.tar.gz mobile-apple: strategy:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afbe01e..3ec43e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml
@@ -5,32 +5,57 @@ schedule: - cron: '50 5 * * *' # 05:50 UTC (21:50 PST, 22:50 PDT) -# Permission needed to upload a release permissions: contents: write jobs: - release-emdawnwebgpu: + build-wasm: runs-on: ubuntu-latest timeout-minutes: 15 - + outputs: + PKG_VERSION: ${{ steps.build.outputs.PKG_VERSION }} steps: - uses: actions/checkout@v4 - - - name: Build + - name: Build Emscripten Package id: build run: | GITHUB_REPOSITORY="${{ github.repository }}" GITHUB_REF_NAME="${{ github.ref_name }}" .github/workflows/package-emdawnwebgpu.sh - - - name: Upload release to GitHub - uses: softprops/action-gh-release@v2 + - name: Upload WASM Artifacts + uses: actions/upload-artifact@v4 with: - # Create a Git tag with this name - tag_name: ${{ steps.build.outputs.PKG_VERSION }} - # User-facing release info - name: ${{ steps.build.outputs.PKG_VERSION }} - body_path: RELEASE_INFO.md - # Files to release (one per line) - files: | + name: emdawnwebgpu + path: | ${{ steps.build.outputs.REMOTE_PORT_FILE }} ${{ steps.build.outputs.PKG_FILE }} + RELEASE_INFO.md + + build-native: + uses: ./.github/workflows/ci.yml + secrets: inherit + + publish: + needs: [build-wasm, build-native] + runs-on: ubuntu-latest + steps: + - name: Download All Artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Display Downloaded Files + run: | + mv artifacts/emdawnwebgpu/RELEASE_INFO.md . + ls -R artifacts + + - name: Upload to GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ needs.build-wasm.outputs.PKG_VERSION }} + name: ${{ needs.build-wasm.outputs.PKG_VERSION }} + body_path: RELEASE_INFO.md + files: | + artifacts/**/Dawn-*.tar.gz + artifacts/**/dawn-android-*.tar.gz + artifacts/**/dawn-apple-*.xcframework.tar.gz + artifacts/**/dawn-headers-*.tar.gz + artifacts/emdawnwebgpu/*