Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit 5459954

Browse files
committed
packaging
1 parent 98ab947 commit 5459954

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,23 @@ jobs:
2828
with:
2929
name: dawn-${{ runner.os }}
3030
path: install_*
31+
32+
Package:
33+
runs-on: ubuntu-latest
34+
needs: Build
35+
steps:
36+
- name: download
37+
uses: actions/download-artifact@v4
38+
with:
39+
path: ./
40+
41+
- name: package
42+
run: |
43+
./package.sh
44+
45+
- name: release
46+
uses: softprops/action-gh-release@v1
47+
with:
48+
files: dawn.zip
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/x64
55
/.vs
66
/out
7+
/dawn.zip
78
CMakeLists.txt.user
89
CMakeSettings.json
910
*~

DawnConfig.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cmake_minimum_required(VERSION 3.31)
2+
3+
add_library(dawn STATIC IMPORTED)
4+
target_include_directories(dawn include)
5+
if(WIN32)
6+
set_target_properties(dawn PROPERTIES IMPORTED_LOCATION "lib/webgpu_dawn.lib")
7+
else()
8+
set_target_properties(dawn PROPERTIES IMPORTED_LOCATION "lib/libwebgpu_dawn.a")
9+
endif()

package.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
root_dir=`pwd`
4+
5+
echo "packaging"
6+
mkdir -p install/dawn
7+
cd install/dawn
8+
cp ../../DawnConfig.cmake .
9+
cp -r ../../install_linux/include .
10+
mkdir lib
11+
cp ../../install_linux/lib/*.a lib
12+
cp ../../install_windows/lib/*.lib lib
13+
cd ..
14+
zip -r ../dawn.zip dawn
15+
cd "$root_dir"
16+
echo "done"
17+

0 commit comments

Comments
 (0)