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

Commit ba55d25

Browse files
committed
debug/release
1 parent 5f76e74 commit ba55d25

File tree

5 files changed

+50
-62
lines changed

5 files changed

+50
-62
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: Build
22
on: [push]
33

44
jobs:
5-
Build:
6-
name: ${{ matrix.os }}
7-
runs-on: ${{ matrix.os }}
5+
Windows:
6+
name: windows-${{ matrix.config }}
7+
runs-on: windows-2025
88
strategy:
99
fail-fast: false
1010
matrix:
11-
os: [windows-2025, ubuntu-24.04]
11+
config: [release, debug]
1212

1313
steps:
1414
- uses: actions/checkout@v4
@@ -21,17 +21,48 @@ jobs:
2121
- name: build
2222
shell: bash
2323
run: |
24-
./run.sh
24+
mkdir build
25+
cd build
26+
cmake ..
27+
cmake --build . --config ${{ matrix.config }} ${paralel}
28+
cmake --install . --config ${{ matrix.config }} --prefix "${root_dir}/install"
2529
2630
- name: upload
2731
uses: actions/upload-artifact@v4
2832
with:
2933
name: dawn-${{ runner.os }}
30-
path: install_*
34+
path: install
35+
36+
Linux:
37+
name: linux
38+
runs-on: ubuntu-24.04
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: submodules
44+
shell: bash
45+
run: |
46+
git submodule update --init --recursive --jobs 8 || echo "some submodules may have failed and it may be ok"
47+
48+
- name: build
49+
shell: bash
50+
run: |
51+
mkdir build
52+
cd build
53+
cmake -DCMAKE_BUILD_TYPE=release ..
54+
cmake --build . ${paralel}
55+
cmake --install . --prefix "${root_dir}/install"
56+
57+
- name: upload
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: dawn-${{ runner.os }}
61+
path: install
3162

3263
Package:
3364
runs-on: ubuntu-latest
34-
needs: Build
65+
needs: [Windows, Linux]
3566
steps:
3667
- uses: actions/checkout@v4
3768

@@ -43,7 +74,16 @@ jobs:
4374

4475
- name: package
4576
run: |
46-
./package.sh
77+
root_dir=`pwd`
78+
mkdir -p install/dawn
79+
cd install/dawn
80+
cp ../../DawnConfig.cmake .
81+
cp -r ../include .
82+
mkdir lib
83+
cp ../lib/*.a lib
84+
cp ../lib/*.lib lib
85+
cd ..
86+
zip -r ../dawn.zip dawn
4787
4888
- name: release
4989
uses: softprops/action-gh-release@v1

DawnConfig.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ add_library(dawn_static STATIC IMPORTED GLOBAL)
77
target_link_libraries(dawn_static INTERFACE dawn_headers)
88
if(WIN32)
99
set_target_properties(dawn_static PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/lib/webgpu_dawn.lib")
10+
set_target_properties(dawn_static PROPERTIES IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_LIST_DIR}/lib/webgpu_dawn_debug.lib")
1011
else()
1112
set_target_properties(dawn_static PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/lib/libwebgpu_dawn.a")
1213
endif()

dawn/CMakeLists.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ set(TINT_BUILD_IR_BINARY OFF CACHE INTERNAL "Build IR binary format support" FOR
3333
set(TINT_BUILD_TESTS OFF CACHE INTERNAL "Build tests" FORCE)
3434
set(TINT_ENABLE_IR_VALIDATION ON CACHE INTERNAL "Enable IR validation for backend codegen" FORCE)
3535

36-
37-
#add_library(tint STATIC)
38-
#install(TARGETS tint ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin)
39-
#function(tint_add_target TARGET KIND)
40-
# tint_add_target_override(${TARGET} ${KIND})
41-
# if(KIND STREQUAL lib)
42-
# target_link_libraries(tint_aggregated ${TARGET})
43-
# endif()
44-
#endfunction(tint_add_target)
45-
36+
set(CMAKE_DEBUG_POSTFIX _debug)
4637

4738
add_subdirectory(dawn)
48-

package.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

run.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)