File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build, Test, and Deploy
2
+
3
+ on :
4
+ push :
5
+ branches : ["master"]
6
+ workflow_dispatch :
7
+
8
+ permissions :
9
+ contents : read
10
+ pages : write
11
+ id-token : write
12
+
13
+ concurrency :
14
+ group : " pages"
15
+ cancel-in-progress : false
16
+
17
+ defaults :
18
+ run :
19
+ shell : bash
20
+
21
+ jobs :
22
+ test :
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - name : Checkout
26
+ uses : actions/checkout@v4
27
+
28
+ - name : Setup Emscripten
29
+ uses : mymindstorm/setup-emsdk@v9
30
+
31
+ - name : Configure CMake Project (Debug)
32
+ run : cmake -B build/debug -DCMAKE_BUILD_TYPE=Debug
33
+
34
+ - name : Build and Run Tests
35
+ run : |
36
+ cmake --build build/debug
37
+ ctest --test-dir build/debug
38
+
39
+ build-and-deploy :
40
+ needs : test
41
+ runs-on : ubuntu-latest
42
+ steps :
43
+ - name : Checkout
44
+ uses : actions/checkout@v4
45
+
46
+ - name : Setup Emscripten
47
+ uses : mymindstorm/setup-emsdk@v9
48
+
49
+ - name : Configure CMake Project (Release)
50
+ run : cmake -B build/release -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ env.EMSDK }}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
51
+
52
+ - name : Build Project
53
+ run : cmake --build build/release
54
+
55
+ - name : Upload artifact
56
+ uses : actions/upload-pages-artifact@v2
57
+ with :
58
+ path : ./web
59
+
60
+ - name : Deploy to GitHub Pages
61
+ uses : actions/deploy-pages@v3
You can’t perform that action at this time.
0 commit comments