Skip to content

Commit e3231b9

Browse files
jacksonrlDawn LUCI CQ
authored andcommitted
[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 #55 GITHUB_PR_HEAD_SHA=a4d1c88a5614c1362cd6ee63f87d6352f3e6d9d3 ORIGINAL_AUTHOR=jacksonrl <203005141+jacksonrl@users.noreply.github.com> Bug: 430624000 GitOrigin-RevId: 2508282 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>
1 parent cda1a20 commit e3231b9

File tree

2 files changed

+41
-14
lines changed

2 files changed

+41
-14
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [ "main" ]
66
pull_request:
77
workflow_dispatch:
8+
workflow_call:
89

910
concurrency:
1011
# Use github.run_id on main branch
@@ -219,13 +220,14 @@ jobs:
219220
if: matrix.arch == 'arm64-v8a'
220221
run: |
221222
cmake --install ${{ matrix.output_dir }} --prefix dawn-headers
223+
cmake -E tar cvzf dawn-headers-${{ github.sha }}.tar.gz dawn-headers/
222224
223225
- name: Upload headers (from arm64-v8a build only)
224226
if: matrix.arch == 'arm64-v8a'
225227
uses: actions/upload-artifact@v4
226228
with:
227229
name: dawn-headers-${{ github.sha }}
228-
path: dawn-headers/
230+
path: dawn-headers-${{ github.sha }}.tar.gz
229231

230232
mobile-apple:
231233
strategy:

.github/workflows/release.yml

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,57 @@ on:
55
schedule:
66
- cron: '50 5 * * *' # 05:50 UTC (21:50 PST, 22:50 PDT)
77

8-
# Permission needed to upload a release
98
permissions:
109
contents: write
1110

1211
jobs:
13-
release-emdawnwebgpu:
12+
build-wasm:
1413
runs-on: ubuntu-latest
1514
timeout-minutes: 15
16-
15+
outputs:
16+
PKG_VERSION: ${{ steps.build.outputs.PKG_VERSION }}
1717
steps:
1818
- uses: actions/checkout@v4
19-
20-
- name: Build
19+
- name: Build Emscripten Package
2120
id: build
2221
run: |
2322
GITHUB_REPOSITORY="${{ github.repository }}" GITHUB_REF_NAME="${{ github.ref_name }}" .github/workflows/package-emdawnwebgpu.sh
23+
- name: Upload WASM Artifacts
24+
uses: actions/upload-artifact@v4
25+
with:
26+
name: emdawnwebgpu
27+
path: |
28+
${{ steps.build.outputs.REMOTE_PORT_FILE }}
29+
${{ steps.build.outputs.PKG_FILE }}
30+
RELEASE_INFO.md
31+
32+
build-native:
33+
uses: ./.github/workflows/ci.yml
34+
secrets: inherit
35+
36+
publish:
37+
needs: [build-wasm, build-native]
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Download All Artifacts
41+
uses: actions/download-artifact@v4
42+
with:
43+
path: artifacts
2444

25-
- name: Upload release to GitHub
45+
- name: Display Downloaded Files
46+
run: |
47+
mv artifacts/emdawnwebgpu/RELEASE_INFO.md .
48+
ls -R artifacts
49+
50+
- name: Upload to GitHub Release
2651
uses: softprops/action-gh-release@v2
2752
with:
28-
# Create a Git tag with this name
29-
tag_name: ${{ steps.build.outputs.PKG_VERSION }}
30-
# User-facing release info
31-
name: ${{ steps.build.outputs.PKG_VERSION }}
53+
tag_name: ${{ needs.build-wasm.outputs.PKG_VERSION }}
54+
name: ${{ needs.build-wasm.outputs.PKG_VERSION }}
3255
body_path: RELEASE_INFO.md
33-
# Files to release (one per line)
3456
files: |
35-
${{ steps.build.outputs.REMOTE_PORT_FILE }}
36-
${{ steps.build.outputs.PKG_FILE }}
57+
artifacts/**/Dawn-*.tar.gz
58+
artifacts/**/dawn-android-*.tar.gz
59+
artifacts/**/dawn-apple-*.xcframework.tar.gz
60+
artifacts/**/dawn-headers-*.tar.gz
61+
artifacts/emdawnwebgpu/*

0 commit comments

Comments
 (0)