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

Commit 32577d8

Browse files
committed
workflow
1 parent aace538 commit 32577d8

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
on: [push]
3+
4+
jobs:
5+
Build:
6+
name: ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [windows-2025, ubuntu-24.04]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: submodules
17+
shell: bash
18+
run: |
19+
git submodule update --init --recursive || echo "some submodules may have failed and it may be ok"
20+
21+
- name: build
22+
shell: bash
23+
run: |
24+
./run.sh
25+
26+
- name: upload
27+
uses: actions/upload-artifact@v3
28+
with:
29+
name: dawn-${{ runner.os }}
30+
path: install_*

run.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@ root_dir=`pwd`
55
#sed -i 's/\bSTATIC\b/OBJECT/g' dawn/dawn/src/tint/CMakeLists.txt
66
#sed -i 's/\btint_add_target\b/tint_add_target_override/g' dawn/dawn/src/tint/CMakeLists.txt
77

8-
mkdir build
9-
cd build
8+
suffix="_linux"
9+
paralel="-- -j8"
10+
if [ "$OSTYPE" = "msys" ]; then
11+
suffix="_windows"
12+
paralel="--parallel 8"
13+
fi
14+
15+
mkdir build${suffix}
16+
cd build${suffix}
1017
echo "configuring"
1118
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
1219
echo "building"
13-
cmake --build . --config Release
20+
cmake --build . --config Release ${paralel}
1421
echo "installing"
15-
cmake --install . --config Release --prefix "${root_dir}/install"
22+
cmake --install . --config Release --prefix "${root_dir}/install${suffix}"
1623
echo "done"
1724
cd "$root_dir"
1825

0 commit comments

Comments
 (0)