-
Notifications
You must be signed in to change notification settings - Fork 9
134 lines (131 loc) · 3.45 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Build Opacity Micro-Map SDK
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Build-Windows:
runs-on: windows-latest
steps:
-
name : Checkout
uses: actions/checkout@v3
with:
submodules: true
-
name: Install dependencies
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install windows-sdk-10.0 cmake -y
-
name: Install Vulkan
run: |
$ver = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest.json" | ConvertFrom-Json).windows
echo Vulkan SDK version $ver
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$ver/windows/VulkanSDK-$ver-Installer.exe" -OutFile VulkanSDK.exe
echo Downloaded
.\VulkanSDK.exe --root C:\VulkanSDK --accept-licenses --default-answer --confirm-command install
-
name: Generate CMake
run: |
$Env:VULKAN_SDK = "C:/VulkanSDK/"
$Env:Path += ";C:/VulkanSDK/Bin"
mkdir "build"
cd "build"
cmake .. -A x64
cd ..
-
name: Build Debug
run: |
cd "build"
cmake --build . --config Debug
cd ..
-
name: Build Release
run: |
cd "build"
cmake --build . --config Release
cd ..
-
name: Run Tests
run: |
cd "build/bin/Release"
./tests.exe --gtest_filter=-*GPU*
cd ../../..
-
name: Install Release
run: |
cd "build"
cmake --install . --config Release
cd ..
-
name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Opacity Micro-Map SDK Windows
path: build/install
Build-Ubuntu:
runs-on: ubuntu-22.04
steps:
-
name : Checkout
uses: actions/checkout@v3
with:
submodules: true
-
name: Setup CMake
uses: jwlawson/[email protected]
with:
cmake-version: '3.16.x'
-
name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
-
name: Install Vulkan SDK
run: |
sudo apt install -y wget
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt update
sudo apt install -y vulkan-sdk
-
name: CMake Generate
run: |
mkdir "build"
cd "build"
cmake -G Ninja ..
cd ..
-
name: Build Debug
run: |
cd "build"
cmake --build . --config Debug
cd ..
-
name: Build Release
run: |
cd "build"
cmake --build . --config Release
cd ..
-
name: Test Release
run: |
cd "build"
cd "bin"
./tests
-
name: Install Release
run: |
cd "build"
cmake --install . --config Release
cd ..
-
name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Opacity Micro-Map SDK Linux
path: build/install