build.yml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. name: build
  2. on:
  3. push:
  4. pull_request:
  5. workflow_run:
  6. # Use a workflow as a trigger of scheduled builds. Forked repositories can disable scheduled builds by disabling
  7. # "scheduled" workflow, while maintaining ability to perform local CI builds.
  8. workflows:
  9. - scheduled
  10. branches:
  11. - master
  12. - docking
  13. types:
  14. - requested
  15. jobs:
  16. Windows:
  17. runs-on: windows-2019
  18. env:
  19. VS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
  20. MSBUILD_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\
  21. steps:
  22. - uses: actions/checkout@v4
  23. - name: Install Dependencies
  24. shell: powershell
  25. run: |
  26. Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.26.3-VC.zip" -OutFile "SDL2-devel-2.26.3-VC.zip"
  27. Expand-Archive -Path SDL2-devel-2.26.3-VC.zip
  28. echo "SDL2_DIR=$(pwd)\SDL2-devel-2.26.3-VC\SDL2-2.26.3\" >>${env:GITHUB_ENV}
  29. Invoke-WebRequest -Uri "https://github.com/ocornut/imgui/files/3789205/vulkan-sdk-1.1.121.2.zip" -OutFile vulkan-sdk-1.1.121.2.zip
  30. Expand-Archive -Path vulkan-sdk-1.1.121.2.zip
  31. echo "VULKAN_SDK=$(pwd)\vulkan-sdk-1.1.121.2\" >>${env:GITHUB_ENV}
  32. - name: Fix Projects
  33. shell: powershell
  34. run: |
  35. # CI workers do not supporter older Visual Studio versions. Fix projects to target newer available version.
  36. gci -recurse -filter "*.vcxproj" | ForEach-Object {
  37. (Get-Content $_.FullName) -Replace "<PlatformToolset>v\d{3}</PlatformToolset>","<PlatformToolset>v142</PlatformToolset>" | Set-Content -Path $_.FullName
  38. (Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>[\d\.]+</WindowsTargetPlatformVersion>","<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>" | Set-Content -Path $_.FullName
  39. }
  40. # Not using matrix here because it would inflate job count too much. Check out and setup is done for every job and that makes build times way too long.
  41. - name: Build example_null (extra warnings, mingw 64-bit)
  42. run: mingw32-make -C examples/example_null WITH_EXTRA_WARNINGS=1
  43. - name: Build example_null (mingw 64-bit, as DLL)
  44. shell: bash
  45. run: |
  46. echo '#ifdef _EXPORT' > example_single_file.cpp
  47. echo '# define IMGUI_API __declspec(dllexport)' >> example_single_file.cpp
  48. echo '#else' >> example_single_file.cpp
  49. echo '# define IMGUI_API __declspec(dllimport)' >> example_single_file.cpp
  50. echo '#endif' >> example_single_file.cpp
  51. echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
  52. echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
  53. g++ -I. -Wall -Wformat -D_EXPORT -shared -o libimgui.dll -Wl,--out-implib,libimgui.a example_single_file.cpp -limm32
  54. g++ -I. -Wall -Wformat -o example_null.exe examples/example_null/main.cpp -L. -limgui
  55. rm -f example_null.exe libimgui.* example_single_file.*
  56. - name: Build example_null (extra warnings, msvc 64-bit)
  57. shell: cmd
  58. run: |
  59. cd examples\example_null
  60. call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat"
  61. .\build_win32.bat /W4
  62. - name: Build example_null (single file build)
  63. shell: bash
  64. run: |
  65. cat > example_single_file.cpp <<'EOF'
  66. #define IMGUI_IMPLEMENTATION
  67. #include "misc/single_file/imgui_single_file.h"
  68. #include "examples/example_null/main.cpp"
  69. EOF
  70. g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp -limm32
  71. - name: Build example_null (with IMGUI_DISABLE_WIN32_FUNCTIONS)
  72. shell: bash
  73. run: |
  74. cat > example_single_file.cpp <<'EOF'
  75. #define IMGUI_DISABLE_WIN32_FUNCTIONS
  76. #define IMGUI_IMPLEMENTATION
  77. #include "misc/single_file/imgui_single_file.h"
  78. #include "examples/example_null/main.cpp"
  79. EOF
  80. g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp -limm32
  81. - name: Build example_null (as DLL)
  82. shell: cmd
  83. run: |
  84. call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat"
  85. echo #ifdef _EXPORT > example_single_file.cpp
  86. echo # define IMGUI_API __declspec(dllexport) >> example_single_file.cpp
  87. echo #else >> example_single_file.cpp
  88. echo # define IMGUI_API __declspec(dllimport) >> example_single_file.cpp
  89. echo #endif >> example_single_file.cpp
  90. echo #define IMGUI_IMPLEMENTATION >> example_single_file.cpp
  91. echo #include "misc/single_file/imgui_single_file.h" >> example_single_file.cpp
  92. cl.exe /D_USRDLL /D_WINDLL /D_EXPORT /I. example_single_file.cpp /LD /FeImGui.dll /link
  93. cl.exe /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp
  94. - name: Build Win32 example_glfw_opengl2
  95. shell: cmd
  96. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  97. - name: Build Win32 example_glfw_opengl3
  98. shell: cmd
  99. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  100. if: github.event_name == 'workflow_run'
  101. - name: Build Win32 example_glfw_vulkan
  102. shell: cmd
  103. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  104. if: github.event_name == 'workflow_run'
  105. - name: Build Win32 example_sdl2_sdlrenderer2
  106. shell: cmd
  107. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  108. if: github.event_name == 'workflow_run'
  109. - name: Build Win32 example_sdl2_vulkan
  110. shell: cmd
  111. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  112. if: github.event_name == 'workflow_run'
  113. - name: Build Win32 example_sdl2_opengl2
  114. shell: cmd
  115. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  116. if: github.event_name == 'workflow_run'
  117. - name: Build Win32 example_sdl2_opengl3
  118. shell: cmd
  119. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  120. - name: Build Win32 example_sdl2_directx11
  121. shell: cmd
  122. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  123. if: github.event_name == 'workflow_run'
  124. - name: Build Win32 example_win32_directx9
  125. shell: cmd
  126. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx9/example_win32_directx9.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  127. - name: Build Win32 example_win32_directx10
  128. shell: cmd
  129. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx10/example_win32_directx10.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  130. - name: Build Win32 example_win32_directx11
  131. shell: cmd
  132. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx11/example_win32_directx11.vcxproj /p:Platform=Win32 /p:Configuration=Release'
  133. if: github.event_name == 'workflow_run'
  134. - name: Build x64 example_glfw_opengl2
  135. shell: cmd
  136. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj /p:Platform=x64 /p:Configuration=Release'
  137. if: github.event_name == 'workflow_run'
  138. - name: Build x64 example_glfw_opengl3
  139. shell: cmd
  140. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj /p:Platform=x64 /p:Configuration=Release'
  141. - name: Build x64 example_glfw_vulkan
  142. shell: cmd
  143. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'
  144. - name: Build x64 example_sdl2_sdlrenderer2
  145. shell: cmd
  146. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj /p:Platform=x64 /p:Configuration=Release'
  147. if: github.event_name == 'workflow_run'
  148. - name: Build x64 example_sdl2_vulkan
  149. shell: cmd
  150. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'
  151. if: github.event_name == 'workflow_run'
  152. - name: Build x64 example_sdl2_opengl2
  153. shell: cmd
  154. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj /p:Platform=x64 /p:Configuration=Release'
  155. if: github.event_name == 'workflow_run'
  156. - name: Build x64 example_sdl2_opengl3
  157. shell: cmd
  158. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj /p:Platform=x64 /p:Configuration=Release'
  159. if: github.event_name == 'workflow_run'
  160. - name: Build x64 example_sdl2_directx11
  161. shell: cmd
  162. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj /p:Platform=x64 /p:Configuration=Release'
  163. - name: Build x64 example_win32_directx9
  164. shell: cmd
  165. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx9/example_win32_directx9.vcxproj /p:Platform=x64 /p:Configuration=Release'
  166. if: github.event_name == 'workflow_run'
  167. - name: Build x64 example_win32_directx10
  168. shell: cmd
  169. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx10/example_win32_directx10.vcxproj /p:Platform=x64 /p:Configuration=Release'
  170. if: github.event_name == 'workflow_run'
  171. - name: Build x64 example_win32_directx11
  172. shell: cmd
  173. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx11/example_win32_directx11.vcxproj /p:Platform=x64 /p:Configuration=Release'
  174. if: github.event_name == 'workflow_run'
  175. - name: Build x64 example_win32_directx12
  176. shell: cmd
  177. run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx12/example_win32_directx12.vcxproj /p:Platform=x64 /p:Configuration=Release'
  178. Linux:
  179. runs-on: ubuntu-22.04
  180. steps:
  181. - uses: actions/checkout@v4
  182. - name: Install Dependencies
  183. run: |
  184. sudo apt-get update
  185. sudo apt-get install -y libglfw3-dev libsdl2-dev gcc-multilib g++-multilib libfreetype6-dev libvulkan-dev
  186. - name: Build example_null (extra warnings, gcc 32-bit)
  187. run: |
  188. make -C examples/example_null clean
  189. CXXFLAGS="$CXXFLAGS -m32 -Werror" make -C examples/example_null WITH_EXTRA_WARNINGS=1
  190. - name: Build example_null (extra warnings, gcc 64-bit)
  191. run: |
  192. make -C examples/example_null clean
  193. CXXFLAGS="$CXXFLAGS -m64 -Werror" make -C examples/example_null WITH_EXTRA_WARNINGS=1
  194. - name: Build example_null (extra warnings, clang 32-bit)
  195. run: |
  196. make -C examples/example_null clean
  197. CXXFLAGS="$CXXFLAGS -m32 -Werror" CXX=clang++ make -C examples/example_null WITH_EXTRA_WARNINGS=1
  198. - name: Build example_null (extra warnings, clang 64-bit)
  199. run: |
  200. make -C examples/example_null clean
  201. CXXFLAGS="$CXXFLAGS -m64 -Werror" CXX=clang++ make -C examples/example_null WITH_EXTRA_WARNINGS=1
  202. - name: Build example_null (extra warnings, empty IM_ASSERT)
  203. run: |
  204. cat > example_single_file.cpp <<'EOF'
  205. #define IM_ASSERT(x)
  206. #define IMGUI_IMPLEMENTATION
  207. #include "misc/single_file/imgui_single_file.h"
  208. #include "examples/example_null/main.cpp"
  209. EOF
  210. g++ -I. -std=c++11 -Wall -Wformat -Wextra -Werror -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros -Wno-empty-body -o example_single_file example_single_file.cpp
  211. - name: Build example_null (freetype)
  212. run: |
  213. make -C examples/example_null clean
  214. make -C examples/example_null WITH_FREETYPE=1
  215. - name: Build example_null (single file build)
  216. run: |
  217. cat > example_single_file.cpp <<'EOF'
  218. #define IMGUI_IMPLEMENTATION
  219. #include "misc/single_file/imgui_single_file.h"
  220. #include "examples/example_null/main.cpp"
  221. EOF
  222. g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  223. - name: Build example_null (with ImWchar32)
  224. run: |
  225. cat > example_single_file.cpp <<'EOF'
  226. #define IMGUI_USE_WCHAR32
  227. #define IMGUI_IMPLEMENTATION
  228. #include "misc/single_file/imgui_single_file.h"
  229. #include "examples/example_null/main.cpp"
  230. EOF
  231. g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  232. - name: Build example_null (with large ImDrawIdx + pointer ImTextureID)
  233. run: |
  234. cat > example_single_file.cpp <<'EOF'
  235. #define ImTextureID void*
  236. #define ImDrawIdx unsigned int
  237. #define IMGUI_IMPLEMENTATION
  238. #include "misc/single_file/imgui_single_file.h"
  239. #include "examples/example_null/main.cpp"
  240. EOF
  241. g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  242. - name: Build example_null (with IMGUI_DISABLE_OBSOLETE_FUNCTIONS)
  243. run: |
  244. cat > example_single_file.cpp <<'EOF'
  245. #define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
  246. #define IMGUI_IMPLEMENTATION
  247. #include "misc/single_file/imgui_single_file.h"
  248. #include "examples/example_null/main.cpp"
  249. EOF
  250. g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  251. - name: Build example_null (with IMGUI_DISABLE_OBSOLETE_KEYIO)
  252. run: |
  253. cat > example_single_file.cpp <<'EOF'
  254. #define IMGUI_DISABLE_OBSOLETE_KEYIO
  255. #define IMGUI_IMPLEMENTATION
  256. #include "misc/single_file/imgui_single_file.h"
  257. #include "examples/example_null/main.cpp"
  258. EOF
  259. g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  260. - name: Build example_null (with IMGUI_DISABLE_DEMO_WINDOWS and IMGUI_DISABLE_DEBUG_TOOLS)
  261. run: |
  262. cat > example_single_file.cpp <<'EOF'
  263. #define IMGUI_DISABLE_DEMO_WINDOWS
  264. #define IMGUI_DISABLE_DEBUG_TOOLS
  265. #define IMGUI_IMPLEMENTATION
  266. #include "misc/single_file/imgui_single_file.h"
  267. #include "examples/example_null/main.cpp"
  268. EOF
  269. g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  270. - name: Build example_null (with IMGUI_DISABLE_FILE_FUNCTIONS)
  271. run: |
  272. cat > example_single_file.cpp <<'EOF'
  273. #define IMGUI_DISABLE_FILE_FUNCTIONS
  274. #define IMGUI_IMPLEMENTATION
  275. #include "misc/single_file/imgui_single_file.h"
  276. #include "examples/example_null/main.cpp"
  277. EOF
  278. g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  279. - name: Build example_null (with IMGUI_USE_BGRA_PACKED_COLOR)
  280. run: |
  281. cat > example_single_file.cpp <<'EOF'
  282. #define IMGUI_USE_BGRA_PACKED_COLOR
  283. #define IMGUI_IMPLEMENTATION
  284. #include "misc/single_file/imgui_single_file.h"
  285. #include "examples/example_null/main.cpp"
  286. EOF
  287. g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  288. - name: Build example_null (with IM_VEC2_CLASS_EXTRA and IM_VEC4_CLASS_EXTRA)
  289. run: |
  290. cat > example_single_file.cpp <<'EOF'
  291. struct MyVec2 { float x; float y; MyVec2(float x, float y) : x(x), y(y) { } };
  292. struct MyVec4 { float x; float y; float z; float w;
  293. MyVec4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) { } };
  294. #define IM_VEC2_CLASS_EXTRA \
  295. ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \
  296. operator MyVec2() const { return MyVec2(x, y); }
  297. #define IM_VEC4_CLASS_EXTRA \
  298. ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \
  299. operator MyVec4() const { return MyVec4(x, y, z, w); }
  300. #define IMGUI_IMPLEMENTATION
  301. #include "misc/single_file/imgui_single_file.h"
  302. #include "examples/example_null/main.cpp"
  303. EOF
  304. g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  305. - name: Build example_null (without c++ runtime, Clang)
  306. run: |
  307. cat > example_single_file.cpp <<'EOF'
  308. #define IMGUI_IMPLEMENTATION
  309. #define IMGUI_DISABLE_DEMO_WINDOWS
  310. #include "misc/single_file/imgui_single_file.h"
  311. #include "examples/example_null/main.cpp"
  312. EOF
  313. clang++ -I. -std=c++11 -Wall -Wformat -nodefaultlibs -fno-rtti -fno-exceptions -fno-threadsafe-statics -lc -lm -o example_single_file example_single_file.cpp
  314. - name: Build example_glfw_opengl2
  315. run: make -C examples/example_glfw_opengl2
  316. - name: Build example_glfw_opengl3
  317. run: make -C examples/example_glfw_opengl3
  318. if: github.event_name == 'workflow_run'
  319. - name: Build example_sdl2_opengl2
  320. run: make -C examples/example_sdl2_opengl2
  321. if: github.event_name == 'workflow_run'
  322. - name: Build example_sdl2_opengl3
  323. run: make -C examples/example_sdl2_opengl3
  324. - name: Build with IMGUI_IMPL_VULKAN_NO_PROTOTYPES
  325. run: g++ -c -I. -std=c++11 -DIMGUI_IMPL_VULKAN_NO_PROTOTYPES=1 backends/imgui_impl_vulkan.cpp
  326. MacOS:
  327. runs-on: macos-latest
  328. steps:
  329. - uses: actions/checkout@v4
  330. - name: Install Dependencies
  331. run: |
  332. brew install glfw3 sdl2
  333. - name: Build example_null (extra warnings, clang 64-bit)
  334. run: make -C examples/example_null WITH_EXTRA_WARNINGS=1
  335. - name: Build example_null (single file build)
  336. run: |
  337. cat > example_single_file.cpp <<'EOF'
  338. #define IMGUI_IMPLEMENTATION
  339. #include "misc/single_file/imgui_single_file.h"
  340. #include "examples/example_null/main.cpp"
  341. EOF
  342. clang++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
  343. - name: Build example_null (without c++ runtime)
  344. run: |
  345. cat > example_single_file.cpp <<'EOF'
  346. #define IMGUI_IMPLEMENTATION
  347. #include "misc/single_file/imgui_single_file.h"
  348. #include "examples/example_null/main.cpp"
  349. EOF
  350. clang++ -I. -std=c++11 -Wall -Wformat -nodefaultlibs -fno-rtti -fno-exceptions -fno-threadsafe-statics -lc -lm -o example_single_file example_single_file.cpp
  351. - name: Build example_glfw_opengl2
  352. run: make -C examples/example_glfw_opengl2
  353. - name: Build example_glfw_opengl3
  354. run: make -C examples/example_glfw_opengl3
  355. if: github.event_name == 'workflow_run'
  356. - name: Build example_glfw_metal
  357. run: make -C examples/example_glfw_metal
  358. - name: Build example_sdl2_metal
  359. run: make -C examples/example_sdl2_metal
  360. - name: Build example_sdl2_opengl2
  361. run: make -C examples/example_sdl2_opengl2
  362. if: github.event_name == 'workflow_run'
  363. - name: Build example_sdl2_opengl3
  364. run: make -C examples/example_sdl2_opengl3
  365. - name: Build example_apple_metal
  366. run: xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_macos
  367. - name: Build example_apple_opengl2
  368. run: xcodebuild -project examples/example_apple_opengl2/example_apple_opengl2.xcodeproj -target example_osx_opengl2
  369. iOS:
  370. runs-on: macos-latest
  371. steps:
  372. - uses: actions/checkout@v4
  373. - name: Build example_apple_metal
  374. run: |
  375. # Code signing is required, but we disable it because it is irrelevant for CI builds.
  376. xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_ios CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
  377. Emscripten:
  378. runs-on: ubuntu-22.04
  379. steps:
  380. - uses: actions/checkout@v4
  381. - name: Install Dependencies
  382. run: |
  383. wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
  384. tar -xvf master.tar.gz
  385. emsdk-master/emsdk update
  386. emsdk-master/emsdk install latest
  387. emsdk-master/emsdk activate latest
  388. - name: Build example_sdl2_opengl3 with Emscripten
  389. run: |
  390. pushd emsdk-master
  391. source ./emsdk_env.sh
  392. popd
  393. make -C examples/example_sdl2_opengl3 -f Makefile.emscripten
  394. - name: Build example_glfw_wgpu
  395. run: |
  396. pushd emsdk-master
  397. source ./emsdk_env.sh
  398. popd
  399. make -C examples/example_glfw_wgpu -f Makefile.emscripten
  400. Android:
  401. runs-on: ubuntu-22.04
  402. steps:
  403. - uses: actions/checkout@v4
  404. - name: Build example_android_opengl3
  405. run: |
  406. cd examples/example_android_opengl3/android
  407. gradle assembleDebug --stacktrace