1
1
name : build
2
2
3
3
on :
4
- push : {}
5
- pull_request : {}
4
+ push :
5
+ pull_request :
6
6
schedule :
7
7
- cron : ' 0 9 * * *'
8
8
@@ -12,21 +12,19 @@ jobs:
12
12
env :
13
13
VS_PATH : C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
14
14
MSBUILD_PATH : C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\
15
- # Until gh-actions allow us to use env variables inside other env variables (because we need %GITHUB_WORKSPACE%) we have to use relative path to imgui/examples/example_name directory.
16
- SDL2_DIR : ..\..\SDL2-devel-2.0.10-VC\SDL2-2.0.10\
17
- VULKAN_SDK : ..\..\vulkan-sdk-1.1.121.2\
18
15
steps :
19
- - uses : actions/checkout@v1
20
- with :
21
- fetch-depth : 1
16
+ - uses : actions/checkout@v2
22
17
23
18
- name : Install Dependencies
24
19
shell : powershell
25
20
run : |
26
21
Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.0.10-VC.zip" -OutFile "SDL2-devel-2.0.10-VC.zip"
27
22
Expand-Archive -Path SDL2-devel-2.0.10-VC.zip
23
+ echo "SDL2_DIR=$(pwd)\SDL2-devel-2.0.10-VC\SDL2-2.0.10\" >>${env:GITHUB_ENV}
24
+
28
25
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
29
26
Expand-Archive -Path vulkan-sdk-1.1.121.2.zip
27
+ echo "VULKAN_SDK=$(pwd)\vulkan-sdk-1.1.121.2\" >>${env:GITHUB_ENV}
30
28
31
29
- name : Fix Projects
32
30
shell : powershell
@@ -55,31 +53,41 @@ jobs:
55
53
- name : Build example_null (single file build)
56
54
shell : bash
57
55
run : |
58
- echo '#define IMGUI_IMPLEMENTATION' > example_single_file.cpp
59
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
60
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
56
+ cat > example_single_file.cpp <<'EOF'
57
+
58
+ #define IMGUI_IMPLEMENTATION
59
+ #include "misc/single_file/imgui_single_file.h"
60
+ #include "examples/example_null/main.cpp"
61
+
62
+ EOF
61
63
g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp
62
64
63
65
- name : Build example_null (with IMGUI_DISABLE_WIN32_FUNCTIONS)
64
66
shell : bash
65
67
run : |
66
- echo '#define IMGUI_DISABLE_WIN32_FUNCTIONS' > example_single_file.cpp
67
- echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
68
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
69
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
68
+ cat > example_single_file.cpp <<'EOF'
69
+
70
+ #define IMGUI_DISABLE_WIN32_FUNCTIONS
71
+ #define IMGUI_IMPLEMENTATION
72
+ #include "misc/single_file/imgui_single_file.h"
73
+ #include "examples/example_null/main.cpp"
74
+
75
+ EOF
70
76
g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp
71
77
72
78
- name : Build example_null (as DLL)
73
79
shell : cmd
74
80
run : |
75
81
call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat"
82
+
76
83
echo #ifdef _EXPORT > example_single_file.cpp
77
84
echo # define IMGUI_API __declspec(dllexport) >> example_single_file.cpp
78
85
echo #else >> example_single_file.cpp
79
86
echo # define IMGUI_API __declspec(dllimport) >> example_single_file.cpp
80
87
echo #endif >> example_single_file.cpp
81
88
echo #define IMGUI_IMPLEMENTATION >> example_single_file.cpp
82
89
echo #include "misc/single_file/imgui_single_file.h" >> example_single_file.cpp
90
+
83
91
cl.exe /D_USRDLL /D_WINDLL /D_EXPORT /I. example_single_file.cpp /LD /FeImGui.dll /link
84
92
cl.exe /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp
85
93
@@ -183,9 +191,7 @@ jobs:
183
191
Linux :
184
192
runs-on : ubuntu-20.04
185
193
steps :
186
- - uses : actions/checkout@v1
187
- with :
188
- fetch-depth : 1
194
+ - uses : actions/checkout@v2
189
195
190
196
- name : Install Dependencies
191
197
run : |
@@ -219,82 +225,118 @@ jobs:
219
225
220
226
- name : Build example_null (single file build)
221
227
run : |
222
- echo '#define IMGUI_IMPLEMENTATION' > example_single_file.cpp
223
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
224
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
228
+ cat > example_single_file.cpp <<'EOF'
229
+
230
+ #define IMGUI_IMPLEMENTATION
231
+ #include "misc/single_file/imgui_single_file.h"
232
+ #include "examples/example_null/main.cpp"
233
+
234
+ EOF
225
235
g++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
226
236
227
237
- name : Build example_null (with ImWchar32)
228
238
run : |
229
- echo '#define IMGUI_USE_WCHAR32' > example_single_file.cpp
230
- echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
231
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
232
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
239
+ cat > example_single_file.cpp <<'EOF'
240
+
241
+ #define IMGUI_USE_WCHAR32
242
+ #define IMGUI_IMPLEMENTATION
243
+ #include "misc/single_file/imgui_single_file.h"
244
+ #include "examples/example_null/main.cpp"
245
+
246
+ EOF
233
247
g++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
234
248
235
249
- name : Build example_null (with large ImDrawIdx)
236
250
run : |
237
- echo '#define ImDrawIdx unsigned int' > example_single_file.cpp
238
- echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
239
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
240
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
251
+ cat > example_single_file.cpp <<'EOF'
252
+
253
+ #define ImDrawIdx unsigned int
254
+ #define IMGUI_IMPLEMENTATION
255
+ #include "misc/single_file/imgui_single_file.h"
256
+ #include "examples/example_null/main.cpp"
257
+
258
+ EOF
241
259
g++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
242
260
243
261
- name : Build example_null (with IMGUI_DISABLE_OBSOLETE_FUNCTIONS)
244
262
run : |
245
- echo '#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS' > example_single_file.cpp
246
- echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
247
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
248
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
263
+ cat > example_single_file.cpp <<'EOF'
264
+
265
+ #define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
266
+ #define IMGUI_IMPLEMENTATION
267
+ #include "misc/single_file/imgui_single_file.h"
268
+ #include "examples/example_null/main.cpp"
269
+
270
+ EOF
249
271
g++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
250
272
251
273
- name : Build example_null (with IMGUI_DISABLE_DEMO_WINDOWS and IMGUI_DISABLE_METRICS_WINDOW)
252
274
run : |
253
- echo '#define IMGUI_DISABLE_DEMO_WINDOWS' > example_single_file.cpp
254
- echo '#define IMGUI_DISABLE_METRICS_WINDOW' >> example_single_file.cpp
255
- echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
256
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
257
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
275
+ cat > example_single_file.cpp <<'EOF'
276
+
277
+ #define IMGUI_DISABLE_DEMO_WINDOWS
278
+ #define IMGUI_DISABLE_METRICS_WINDOW
279
+ #define IMGUI_IMPLEMENTATION
280
+ #include "misc/single_file/imgui_single_file.h"
281
+ #include "examples/example_null/main.cpp"
282
+
283
+ EOF
258
284
g++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
259
285
260
286
- name : Build example_null (with IMGUI_DISABLE_FILE_FUNCTIONS)
261
287
run : |
262
- echo '#define IMGUI_DISABLE_FILE_FUNCTIONS' > example_single_file.cpp
263
- echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
264
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
265
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
288
+ cat > example_single_file.cpp <<'EOF'
289
+
290
+ #define IMGUI_DISABLE_FILE_FUNCTIONS
291
+ #define IMGUI_IMPLEMENTATION
292
+ #include "misc/single_file/imgui_single_file.h"
293
+ #include "examples/example_null/main.cpp"
294
+
295
+ EOF
266
296
g++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
267
297
268
298
- name : Build example_null (with IMGUI_USE_BGRA_PACKED_COLOR)
269
299
run : |
270
- echo '#define IMGUI_USE_BGRA_PACKED_COLOR' > example_single_file.cpp
271
- echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
272
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
273
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
300
+ cat > example_single_file.cpp <<'EOF'
301
+
302
+ #define IMGUI_USE_BGRA_PACKED_COLOR
303
+ #define IMGUI_IMPLEMENTATION
304
+ #include "misc/single_file/imgui_single_file.h"
305
+ #include "examples/example_null/main.cpp"
306
+
307
+ EOF
274
308
g++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
275
309
276
310
- name : Build example_null (with IM_VEC2_CLASS_EXTRA and IM_VEC4_CLASS_EXTRA)
277
311
run : |
278
- echo 'struct MyVec2 { float x; float y; MyVec2(float x, float y) : x(x), y(y) { } };' > example_single_file.cpp
279
- echo 'struct MyVec4 { float x; float y; float z; float w;' >> example_single_file.cpp
280
- echo 'MyVec4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) { } };' >> example_single_file.cpp
281
- echo '#define IM_VEC2_CLASS_EXTRA \' >> example_single_file.cpp
282
- echo ' ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \' >> example_single_file.cpp
283
- echo ' operator MyVec2() const { return MyVec2(x, y); }' >> example_single_file.cpp
284
- echo '#define IM_VEC4_CLASS_EXTRA \' >> example_single_file.cpp
285
- echo ' ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \' >> example_single_file.cpp
286
- echo ' operator MyVec4() const { return MyVec4(x, y, z, w); }' >> example_single_file.cpp
287
- echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
288
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
289
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
312
+ cat > example_single_file.cpp <<'EOF'
313
+
314
+ struct MyVec2 { float x; float y; MyVec2(float x, float y) : x(x), y(y) { } };
315
+ struct MyVec4 { float x; float y; float z; float w;
316
+ MyVec4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) { } };
317
+ #define IM_VEC2_CLASS_EXTRA \
318
+ ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \
319
+ operator MyVec2() const { return MyVec2(x, y); }
320
+ #define IM_VEC4_CLASS_EXTRA \
321
+ ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \
322
+ operator MyVec4() const { return MyVec4(x, y, z, w); }
323
+ #define IMGUI_IMPLEMENTATION
324
+ #include "misc/single_file/imgui_single_file.h"
325
+ #include "examples/example_null/main.cpp"
326
+
327
+ EOF
290
328
g++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
291
329
292
330
- name : Build example_null (without c++ runtime, Clang)
293
331
run : |
294
- echo '#define IMGUI_IMPLEMENTATION' > example_single_file.cpp
295
- echo '#define IMGUI_DISABLE_DEMO_WINDOWS' >> example_single_file.cpp
296
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
297
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
332
+ cat > example_single_file.cpp <<'EOF'
333
+
334
+ #define IMGUI_IMPLEMENTATION
335
+ #define IMGUI_DISABLE_DEMO_WINDOWS
336
+ #include "misc/single_file/imgui_single_file.h"
337
+ #include "examples/example_null/main.cpp"
338
+
339
+ EOF
298
340
clang++ -I. -Wall -Wformat -nodefaultlibs -fno-rtti -fno-exceptions -fno-threadsafe-statics -lc -lm -o example_single_file example_single_file.cpp
299
341
300
342
- name : Build example_glfw_opengl2
@@ -314,30 +356,35 @@ jobs:
314
356
MacOS :
315
357
runs-on : macOS-latest
316
358
steps :
317
- - uses : actions/checkout@v1
318
- with :
319
- fetch-depth : 1
359
+ - uses : actions/checkout@v2
320
360
321
361
- name : Install Dependencies
322
362
run : |
323
- brew install glfw3
324
- brew install sdl2
363
+ brew install glfw3 sdl2
325
364
326
365
- name : Build example_null (extra warnings, clang 64-bit)
327
366
run : make -C examples/example_null WITH_EXTRA_WARNINGS=1
328
367
329
368
- name : Build example_null (single file build)
330
369
run : |
331
- echo '#define IMGUI_IMPLEMENTATION' > example_single_file.cpp
332
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
333
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
370
+ cat > example_single_file.cpp <<'EOF'
371
+
372
+ #define IMGUI_IMPLEMENTATION
373
+ #include "misc/single_file/imgui_single_file.h"
374
+ #include "examples/example_null/main.cpp"
375
+
376
+ EOF
334
377
clang++ -I. -Wall -Wformat -o example_single_file example_single_file.cpp
335
378
336
379
- name : Build example_null (without c++ runtime)
337
380
run : |
338
- echo '#define IMGUI_IMPLEMENTATION' > example_single_file.cpp
339
- echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
340
- echo '#include "examples/example_null/main.cpp"' >> example_single_file.cpp
381
+ cat > example_single_file.cpp <<'EOF'
382
+
383
+ #define IMGUI_IMPLEMENTATION
384
+ #include "misc/single_file/imgui_single_file.h"
385
+ #include "examples/example_null/main.cpp"
386
+
387
+ EOF
341
388
clang++ -I. -Wall -Wformat -nodefaultlibs -fno-rtti -fno-exceptions -fno-threadsafe-statics -lc -lm -o example_single_file example_single_file.cpp
342
389
343
390
- name : Build example_glfw_opengl2
@@ -369,9 +416,7 @@ jobs:
369
416
iOS :
370
417
runs-on : macOS-latest
371
418
steps :
372
- - uses : actions/checkout@v1
373
- with :
374
- fetch-depth : 1
419
+ - uses : actions/checkout@v2
375
420
376
421
- name : Build example_apple_metal
377
422
run : |
@@ -381,9 +426,7 @@ jobs:
381
426
Emscripten :
382
427
runs-on : ubuntu-18.04
383
428
steps :
384
- - uses : actions/checkout@v1
385
- with :
386
- fetch-depth : 1
429
+ - uses : actions/checkout@v2
387
430
388
431
- name : Install Dependencies
389
432
run : |
0 commit comments