Debian Codegraph @

.github/workflows/Build.yaml

raw symbols SCIP
1 name: Build
2
3 on:
4 push:
5 branches: [ "**" ]
6 pull_request:
7 branches: [ "**" ]
8
9 jobs:
10 macOS-premake:
11 strategy:
12 matrix:
13 conf:
14 - Debug
15 - Release
16
17 runs-on: macos-latest
18
19 steps:
20 - uses: actions/checkout@v3
21
22 - name: Download & install SDL
23 run: |
24 curl -L -o SDL2.dmg https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-2.24.2.dmg
25 hdiutil attach SDL2.dmg
26 cp -r /Volumes/SDL2/SDL2.framework RecastDemo/Bin
27 hdiutil detach /Volumes/SDL2
28 rm SDL2.dmg
29
30 - name: Download & install premake
31 working-directory: RecastDemo
32 run: |
33 curl -L -o premake.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-macosx.tar.gz
34 tar -xzf premake.tar.gz
35 rm premake.tar.gz
36
37 - name: Run premake
38 working-directory: RecastDemo
39 run: ./premake5 xcode4
40
41 - name: Build With Xcode
42 working-directory: RecastDemo/Build/xcode4/
43 run: xcodebuild -scheme RecastDemo -configuration ${{matrix.conf}} -project RecastDemo.xcodeproj build
44
45 - name: Build Unit Tests With Xcode
46 working-directory: RecastDemo/Build/xcode4/
47 run: xcodebuild -scheme Tests -configuration ${{matrix.conf}} -project Tests.xcodeproj build
48
49 macos-cmake:
50 strategy:
51 matrix:
52 conf:
53 - Debug
54 - Release
55
56 runs-on: macos-latest
57
58 steps:
59 - uses: actions/checkout@v3
60 - name: Download & install SDL
61 run: |
62 curl -L -o SDL2.dmg https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-2.24.2.dmg
63 hdiutil attach SDL2.dmg
64 cp -r /Volumes/SDL2/SDL2.framework ${{github.workspace}}/RecastDemo/Bin/
65 hdiutil detach /Volumes/SDL2
66 rm SDL2.dmg
67
68 - name: Configure CMake
69 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
70 # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
71 run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.conf}} -DSDL2_LIBRARY=${{github.workspace}}/RecastDemo/Bin/SDL2.framework
72
73 - name: Build
74 run: cmake --build ${{github.workspace}}/build --config ${{matrix.conf}}
75
76 linux-premake:
77 strategy:
78 matrix:
79 conf:
80 - debug
81 - release
82 compiler:
83 - clang
84 - gcc
85
86 runs-on: ubuntu-latest
87
88 steps:
89 - uses: actions/checkout@v3
90
91 - name: Install opengl and SDL
92 run: |
93 sudo apt-get update
94 sudo apt-get install -y libgl1-mesa-dev libsdl2-dev
95
96 - name: Download & Install premake
97 working-directory: RecastDemo
98 run: |
99 curl -L -o premake.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz
100 tar -xzf premake.tar.gz
101 rm premake.tar.gz
102
103 - name: Run premake
104 working-directory: RecastDemo
105 run: ./premake5 --cc=${{matrix.compiler}} gmake2
106
107 - name: Build
108 working-directory: RecastDemo/Build/gmake2
109 run: make config=${{matrix.conf}} verbose=true
110
111 linux-cmake:
112 strategy:
113 matrix:
114 conf:
115 - Debug
116 - Release
117
118 runs-on: ubuntu-latest
119
120 steps:
121 - uses: actions/checkout@v3
122
123 - name: Install opengl and SDL
124 run: |
125 sudo apt-get update
126 sudo apt-get install -y libgl1-mesa-dev libsdl2-dev
127
128 - name: Configure CMake
129 run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.conf}}
130
131 - name: Build
132 run: cmake --build ${{github.workspace}}/build --config ${{matrix.conf}}
133
134 windows-premake:
135 strategy:
136 matrix:
137 conf:
138 - Debug
139 - Release
140 vs-version:
141 - vs2019
142 - vs2022
143 include:
144 - vs-version: vs2019
145 version-range: '16.0'
146 runner: windows-2019
147 - vs-version: vs2022
148 version-range: '17.0'
149 runner: windows-2022
150
151 runs-on: ${{matrix.runner}}
152
153 steps:
154 - uses: actions/checkout@v3
155
156 - name: Add msbuild to PATH
157 uses: microsoft/[email protected]
158 with:
159 vs-version: ${{matrix.version-range}}
160
161 - name: Download and Install SDL
162 working-directory: RecastDemo/Contrib
163 shell: pwsh
164 run: |
165 (new-object System.Net.WebClient).DownloadFile("https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip","${{github.workspace}}/RecastDemo/Contrib/SDL.zip")
166 tar -xf SDL.zip
167 ren SDL2-2.24.2 SDL
168 del SDL.zip
169
170 - name: Download and Install Premake
171 working-directory: RecastDemo
172 shell: pwsh
173 run: |
174 (new-object System.Net.WebClient).DownloadFile("https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip","${{github.workspace}}/RecastDemo/premake.zip")
175 tar -xf premake.zip
176 del premake.zip
177
178 - name: Run Premake
179 working-directory: RecastDemo
180 run: ./premake5.exe ${{matrix.vs-version}}
181
182 - name: Build
183 working-directory: RecastDemo/Build/${{matrix.vs-version}}
184 run: msbuild RecastDemo.vcxproj -property:Configuration=${{matrix.conf}}
185
186 windows-cmake:
187 strategy:
188 matrix:
189 conf:
190 - Debug
191 - Release
192 vs-version:
193 - vs2019
194 - vs2022
195 include:
196 - vs-version: vs2019
197 cmake-generator: Visual Studio 16 2019
198 runner: windows-2019
199 - vs-version: vs2022
200 cmake-generator: Visual Studio 17 2022
201 runner: windows-2022
202
203 runs-on: ${{matrix.runner}}
204
205 steps:
206 - uses: actions/checkout@v3
207
208 - name: Download and Install SDL
209 working-directory: RecastDemo/Contrib
210 shell: pwsh
211 run: |
212 (new-object System.Net.WebClient).DownloadFile("https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip","${{github.workspace}}/RecastDemo/Contrib/SDL.zip")
213 tar -xf SDL.zip
214 ren SDL2-2.24.2 SDL
215 del SDL.zip
216
217 - name: Configure CMake
218 run: cmake -G "${{matrix.cmake-generator}}" -B ${{github.workspace}}/build -D CMAKE_BUILD_TYPE=${{matrix.conf}} -D CMAKE_INSTALL_PREFIX=${{github.workspace}}/build
219
220 - name: Build with CMake
221 run: cmake --build ${{github.workspace}}/build --config ${{matrix.conf}}