Skip to content

Commit 5e3f9dc

Browse files
committed
Enable Windows
1 parent 3572de5 commit 5e3f9dc

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

.github/workflows/dawn.yaml

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ jobs:
9999
- platform: macos-latest
100100
target: macosx
101101
python-version: "3.11"
102-
# - platform: windows-latest
103-
# target: windows
104-
# python-version: "3.11"
102+
- platform: windows-latest
103+
target: windows
104+
python-version: "3.11"
105105
- platform: macos-latest
106106
target: iphoneos
107107
python-version: "3.11"
@@ -219,6 +219,9 @@ jobs:
219219

220220
create-release:
221221
needs: [create-bundle, get-dawn-version]
222+
permissions:
223+
contents: write
224+
packages: write
222225
runs-on: ubuntu-latest
223226
steps:
224227
- name: Checkout code
@@ -245,34 +248,24 @@ jobs:
245248
echo "tag=$TAG" >> $GITHUB_OUTPUT
246249
247250
- name: Create Release
248-
uses: actions/create-release@v1
249-
env:
250-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
251+
uses: ncipollo/release-action@v1
251252
with:
252-
release_name: Dawn WebGPU from Chromium ${{ needs.get-dawn-version.outputs.chromium_dawn_version }}
253-
tag_name: ${{ steps.tag.outputs.tag }}
253+
name: Dawn WebGPU from Chromium ${{ needs.get-dawn-version.outputs.chromium_dawn_version }} (${{ github.event.inputs.config }})
254+
tag: ${{ steps.tag.outputs.tag }}
254255
body: |
255-
Dawn WebGPU build matching Chromium ${{ needs.get-dawn-version.outputs.chromium_dawn_version }}.
256-
Built from Dawn hash: ${{ needs.get-dawn-version.outputs.chromium_dawn_hash }}
257-
SHA256: ${{ steps.compute-sha256.outputs.sha256sum }}
256+
**Chromium channel:** ${{ github.event.inputs.channel }}
257+
**Chromium version:** ${{ needs.get-dawn-version.outputs.chromium_dawn_version }}
258+
**Configuration:** ${{ github.event.inputs.config }}
259+
**Dawn hash:** ${{ needs.get-dawn-version.outputs.chromium_dawn_hash }}
260+
**SHA256:** ${{ steps.compute-sha256.outputs.sha256sum }}
261+
262+
This release contains pre-built Dawn WebGPU libraries in an archive bundle for multiple platforms:
258263
259-
This release contains pre-built Dawn WebGPU libraries for multiple platforms:
260264
- linux (x86_64)
261265
- macosx (x86_64 + ARM64)
262266
- iphoneos (ARM64)
263267
- iphonesimulator (x86_64)
268+
- windows (x86_64)
264269
265270
These are just the raw Dawn libraries and do not include the Swift API layer.
266-
267-
Built from Chromium channel: ${{ github.event.inputs.channel }}
268-
draft: false
269-
prerelease: false
270-
271-
- name: Upload Release Assets
272-
run: |
273-
TAG="${{ steps.tag.outputs.tag }}"
274-
echo "Uploading to release: $TAG"
275-
cd dawn-bundle
276-
gh release upload $TAG ${{needs.create-bundle.outputs.bundle_name}} --clobber
277-
env:
278-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
271+
artifacts: Dawn/dist/${{needs.create-bundle.outputs.bundle_name}}

Dawn/archive_builder.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def write_target_manifest(
2828
target_dir = build_dir / str(target_config) / "install"
2929
manifest = {
3030
"targetName": str(target_config),
31-
"libraryPath": str(target_dir / "lib"),
32-
"includePath": str(target_dir / "include"),
31+
"libraryPath": (target_dir / "lib").as_posix(),
32+
"includePath": (target_dir / "include").as_posix(),
3333
"supportedTriples": target_config.triples(),
3434
"libraryName": "libwebgpu_dawn.lib"
3535
if target_config.os.is_windows()
@@ -165,7 +165,9 @@ def create_artifact_bundle(version: str, archive_name: str) -> pathlib.Path:
165165
archive_path.unlink()
166166

167167
shutil.make_archive(
168-
archive_path, "zip", root_dir=dist_directory(), base_dir=archive_dir.name
168+
archive_path, "zip",
169+
root_dir=dist_directory(),
170+
base_dir=archive_dir.name,
169171
)
170172

171173
return archive_path

Dawn/ci_build_dawn.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ def parse_args() -> argparse.Namespace:
8787
help="Chromium channel to use for Dawn",
8888
)
8989

90-
get_parser = subparsers.add_parser("get-source", help="Get the Dawn source")
90+
get_parser = subparsers.add_parser(
91+
"get-source",
92+
help="Get the Dawn source"
93+
)
9194
get_parser.add_argument(
9295
"--hash",
9396
required=True,
@@ -135,6 +138,7 @@ def main() -> int:
135138
"macosx",
136139
"iphoneos",
137140
"iphonesimulator",
141+
"windows",
138142
]:
139143
print(f"Invalid target: {args.target}")
140144
return _EXIT_FAILURE

0 commit comments

Comments
 (0)