|
30 | 30 | workflow_call: |
31 | 31 | inputs: |
32 | 32 | channel: |
33 | | - description: "Chromium channel for Dawn" |
34 | 33 | required: false |
35 | 34 | default: "canary" |
36 | | - type: choice |
37 | | - options: |
38 | | - - stable |
39 | | - - beta |
40 | | - - canary |
| 35 | + description: "Chromium channel for Dawn (stable, beta, canary)" |
| 36 | + type: string |
41 | 37 | config: |
42 | | - description: "Configuration" |
| 38 | + description: "Configuration (release or debug)" |
43 | 39 | required: false |
44 | 40 | default: "release" |
45 | | - type: choice |
46 | | - options: |
47 | | - - release |
48 | | - - debug |
49 | | - secrets: |
50 | | - GITHUB_TOKEN: |
51 | | - required: true |
| 41 | + type: string |
52 | 42 |
|
53 | 43 | jobs: |
54 | 44 | get-dawn-version: |
|
109 | 99 | - platform: macos-latest |
110 | 100 | target: macosx |
111 | 101 | python-version: "3.11" |
112 | | - # - platform: windows-latest |
113 | | - # target: windows |
114 | | - # python-version: "3.11" |
| 102 | + - platform: windows-latest |
| 103 | + target: windows |
| 104 | + python-version: "3.11" |
115 | 105 | - platform: macos-latest |
116 | 106 | target: iphoneos |
117 | 107 | python-version: "3.11" |
@@ -150,7 +140,7 @@ jobs: |
150 | 140 | - name: Build Dawn for ${{ matrix.target }} |
151 | 141 | run: | |
152 | 142 | cd Dawn |
153 | | - python ci_build_dawn.py build-target --target ${{ matrix.target }} --config ${{ env.DAWN_CONFIG }} |
| 143 | + python ci_build_dawn.py build-target --target ${{ matrix.target }} --config ${{ github.event.inputs.config }} |
154 | 144 |
|
155 | 145 | - name: Upload build artifacts |
156 | 146 | uses: actions/upload-artifact@v4 |
@@ -220,69 +210,40 @@ jobs: |
220 | 210 | BUNDLE_NAME="dawn_webgpu_${{needs.get-dawn-version.outputs.chromium_dawn_suffix}}.zip" |
221 | 211 | echo "bundle_name=$BUNDLE_NAME" >> $GITHUB_OUTPUT |
222 | 212 |
|
223 | | - - name: Upload bundle artifact |
224 | | - uses: actions/upload-artifact@v4 |
225 | | - with: |
226 | | - name: dawn-webgpu-bundle |
227 | | - path: Dawn/dist/${{steps.set-bundle-name.outputs.bundle_name}} |
228 | | - retention-days: 30 |
229 | | - |
230 | | - create-release: |
231 | | - needs: [create-bundle, get-dawn-version] |
232 | | - runs-on: ubuntu-latest |
233 | | - steps: |
234 | | - - name: Checkout code |
235 | | - uses: actions/checkout@v4 |
236 | | - |
237 | | - - name: Download bundle artifact |
238 | | - uses: actions/download-artifact@v5 |
239 | | - with: |
240 | | - name: dawn-webgpu-bundle |
241 | | - path: dawn-bundle/ |
242 | | - merge-multiple: true |
243 | | - |
244 | 213 | - name: Compute SHA256 |
245 | 214 | id: compute-sha256 |
246 | 215 | run: | |
247 | | - cd dawn-bundle |
248 | | - sha256sum ${{needs.create-bundle.outputs.bundle_name}} > sha256sum.txt |
| 216 | + cd Dawn/dist |
| 217 | + sha256sum ${{steps.set-bundle-name.outputs.bundle_name}} > sha256sum.txt |
249 | 218 | echo "sha256sum=$(cat sha256sum.txt)" >> $GITHUB_OUTPUT |
250 | 219 |
|
251 | 220 | - name: Tag name |
252 | 221 | id: tag |
253 | 222 | run: | |
254 | | - TAG="dawn-chromium-${{github.event.inputs.channel}}-${{needs.get-dawn-version.outputs.chromium_dawn_version}}" |
| 223 | + TAG="dawn-chromium-${{github.event.inputs.channel}}-${{needs.get-dawn-version.outputs.chromium_dawn_version}}-${{github.event.inputs.config}}" |
255 | 224 | echo "tag=$TAG" >> $GITHUB_OUTPUT |
256 | 225 |
|
257 | 226 | - name: Create Release |
258 | | - uses: actions/create-release@v1 |
259 | | - env: |
260 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 227 | + uses: ncipollo/release-action@v1 |
261 | 228 | with: |
262 | | - release_name: Dawn WebGPU from Chromium ${{ needs.get-dawn-version.outputs.chromium_dawn_version }} |
263 | | - tag_name: ${{ steps.tag.outputs.tag }} |
| 229 | + name: Dawn WebGPU from Chromium ${{ needs.get-dawn-version.outputs.chromium_dawn_version }} (${{ github.event.inputs.config }}) |
| 230 | + tag: ${{ steps.tag.outputs.tag }} |
264 | 231 | body: | |
265 | | - Dawn WebGPU build matching Chromium ${{ needs.get-dawn-version.outputs.chromium_dawn_version }}. |
266 | | - Built from Dawn hash: ${{ needs.get-dawn-version.outputs.chromium_dawn_hash }} |
267 | | - SHA256: ${{ steps.compute-sha256.outputs.sha256sum }} |
| 232 | + **Chromium channel:** ${{ github.event.inputs.channel }} |
| 233 | + **Chromium version:** ${{ needs.get-dawn-version.outputs.chromium_dawn_version }} |
| 234 | + **Configuration:** ${{ github.event.inputs.config }} |
| 235 | + **Dawn hash:** ${{ needs.get-dawn-version.outputs.chromium_dawn_hash }} |
| 236 | + **SHA256:** ${{ steps.compute-sha256.outputs.sha256sum }} |
| 237 | +
|
| 238 | + This release contains pre-built Dawn WebGPU libraries in an archive bundle for multiple platforms: |
268 | 239 |
|
269 | | - This release contains pre-built Dawn WebGPU libraries for multiple platforms: |
270 | 240 | - linux (x86_64) |
271 | 241 | - macosx (x86_64 + ARM64) |
272 | 242 | - iphoneos (ARM64) |
273 | 243 | - iphonesimulator (x86_64) |
| 244 | + - windows (x86_64) |
274 | 245 |
|
275 | 246 | These are just the raw Dawn libraries and do not include the Swift API layer. |
276 | | -
|
277 | | - Built from Chromium channel: ${{ github.event.inputs.channel }} |
278 | | - draft: false |
279 | | - prerelease: false |
280 | | - |
281 | | - - name: Upload Release Assets |
282 | | - run: | |
283 | | - TAG="${{ steps.tag.outputs.tag }}" |
284 | | - echo "Uploading to release: $TAG" |
285 | | - cd dawn-bundle |
286 | | - gh release upload $TAG ${{needs.create-bundle.outputs.bundle_name}} --clobber |
287 | | - env: |
288 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 247 | + artifacts: Dawn/dist/${{steps.set-bundle-name.outputs.bundle_name}} |
| 248 | + artifactErrorsFailBuild: true |
| 249 | + removeArtifacts: true |
0 commit comments