2626 DAWN_CONFIG : ${{ github.event.inputs.config || 'release' }}
2727
2828jobs :
29- get-dawn-source :
29+ get-dawn-version :
3030 runs-on : ubuntu-latest
3131 outputs :
3232 chromium_channel : ${{ steps.read-version.outputs.chromium_channel }}
@@ -48,21 +48,10 @@ jobs:
4848 cd Dawn
4949 pip install -r requirements.txt
5050
51- - name : Get Dawn source
51+ - name : Get Dawn version
5252 run : |
5353 cd Dawn
54- python ci_build_dawn.py get-dawn --channel ${{ env.DAWN_CHANNEL }}
55-
56- - name : Upload Dawn source
57- uses : actions/upload-artifact@v4
58- with :
59- name : dawn-source
60- path : |
61- Dawn/dawn_source/
62- !Dawn/dawn_source/.git
63- !Dawn/dawn_source/**/*.git
64- !Dawn/dawn_source/third_party/khronos/OpenGL-Registry/specs
65- retention-days : 1
54+ python ci_build_dawn.py get-dawn-version --channel ${{ env.DAWN_CHANNEL }}
6655
6756 - name : Upload Dawn Version
6857 uses : actions/upload-artifact@v4
8574 echo "chromium_dawn_suffix=$value" >> $GITHUB_OUTPUT
8675
8776 build-dawn :
88- needs : get-dawn-source
77+ needs : get-dawn-version
8978 strategy :
9079 matrix :
9180 include :
@@ -129,10 +118,9 @@ jobs:
129118 pip install -r requirements.txt
130119
131120 - name : Download Dawn source
132- uses : actions/download-artifact@v5
133- with :
134- name : dawn-source
135- path : Dawn/dawn_source/
121+ run : |
122+ cd Dawn
123+ python ci_build_dawn.py get-source --hash ${{ needs.get-dawn-version.outputs.chromium_dawn_hash }}
136124
137125 - name : Build Dawn for ${{ matrix.target }}
138126 run : |
@@ -148,8 +136,16 @@ jobs:
148136 !Dawn/builds/*/out
149137 retention-days : 1
150138
139+ - name : Upload dawn.json
140+ if : matrix.platform == 'ubuntu-latest'
141+ uses : actions/upload-artifact@v4
142+ with :
143+ name : dawn-json
144+ path : Dawn/dawn_source/src/dawn/dawn.json
145+ retention-days : 1
146+
151147 create-bundle :
152- needs : [build-dawn, get-dawn-source ]
148+ needs : [build-dawn, get-dawn-version ]
153149 runs-on : ubuntu-latest
154150 outputs :
155151 bundle_name : ${{ steps.set-bundle-name.outputs.bundle_name }}
@@ -168,11 +164,11 @@ jobs:
168164 cd Dawn
169165 pip install -r requirements.txt
170166
171- - name : Download Dawn source
167+ - name : Download dawn.json
172168 uses : actions/download-artifact@v5
173169 with :
174- name : dawn-source
175- path : Dawn/dawn_source/
170+ name : dawn-json
171+ path : Dawn/dawn_source/src/dawn
176172
177173 - name : Download all build artifacts
178174 uses : actions/download-artifact@v5
@@ -196,7 +192,7 @@ jobs:
196192 - name : Set bundle name
197193 id : set-bundle-name
198194 run : |
199- BUNDLE_NAME="dawn_webgpu_${{needs.get-dawn-source .outputs.chromium_dawn_suffix}}.zip"
195+ BUNDLE_NAME="dawn_webgpu_${{needs.get-dawn-version .outputs.chromium_dawn_suffix}}.zip"
200196 echo "bundle_name=$BUNDLE_NAME" >> $GITHUB_OUTPUT
201197
202198 - name : Upload bundle artifact
@@ -207,7 +203,7 @@ jobs:
207203 retention-days : 30
208204
209205 create-release :
210- needs : [create-bundle, get-dawn-source ]
206+ needs : [create-bundle, get-dawn-version ]
211207 runs-on : ubuntu-latest
212208 steps :
213209 - name : Checkout code
@@ -230,19 +226,19 @@ jobs:
230226 - name : Tag name
231227 id : tag
232228 run : |
233- TAG="dawn-chromium-${{env.DAWN_CHANNEL}}-${{needs.get-dawn-source .outputs.chromium_dawn_version}}"
229+ TAG="dawn-chromium-${{env.DAWN_CHANNEL}}-${{needs.get-dawn-version .outputs.chromium_dawn_version}}"
234230 echo "tag=$TAG" >> $GITHUB_OUTPUT
235231
236232 - name : Create Release
237233 uses : actions/create-release@v1
238234 env :
239235 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
240236 with :
241- release_name : Dawn WebGPU from Chromium ${{ needs.get-dawn-source .outputs.chromium_dawn_version }}
237+ release_name : Dawn WebGPU from Chromium ${{ needs.get-dawn-version .outputs.chromium_dawn_version }}
242238 tag_name : ${{ steps.tag.outputs.tag }}
243239 body : |
244- Dawn WebGPU build matching Chromium ${{ needs.get-dawn-source .outputs.chromium_dawn_version }}.
245- Built from Dawn hash: ${{ needs.get-dawn-source .outputs.chromium_dawn_hash }}
240+ Dawn WebGPU build matching Chromium ${{ needs.get-dawn-version .outputs.chromium_dawn_version }}.
241+ Built from Dawn hash: ${{ needs.get-dawn-version .outputs.chromium_dawn_hash }}
246242 SHA256: ${{ steps.compute-sha256.outputs.sha256sum }}
247243
248244 This release contains pre-built Dawn WebGPU libraries for multiple platforms:
0 commit comments