Browse Source

CI: Add unity builds test. (#2893)

pull/2917/head
Rokas Kupstys 5 years ago
committed by omar
parent
commit
1742ca45c5
  1. 9
      .github/workflows/build.yml
  2. 11
      examples/example_null/Makefile
  3. 6
      examples/example_null/unity_build.cpp

9
.github/workflows/build.yml

@ -44,6 +44,9 @@ jobs:
- name: Build example_null (extra warnings)
run: mingw32-make -C examples/example_null EXTRA_WARNINGS=1
- name: Build example_null (unity build)
run: mingw32-make -C examples/example_null UNITY_BUILD=1
- name: Build Win32 example_glfw_opengl2
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
@ -156,6 +159,9 @@ jobs:
- name: Build example_null (extra warnings)
run: make -C examples/example_null EXTRA_WARNINGS=1
- name: Build example_null (unity build)
run: make -C examples/example_null UNITY_BUILD=1
- name: Build example_glfw_opengl2
run: make -C examples/example_glfw_opengl2
@ -185,6 +191,9 @@ jobs:
- name: Build example_null (extra warnings)
run: make -C examples/example_null EXTRA_WARNINGS=1
- name: Build example_null (unity build)
run: make -C examples/example_null UNITY_BUILD=1
- name: Build example_glfw_opengl2
run: make -C examples/example_glfw_opengl2

11
examples/example_null/Makefile

@ -4,11 +4,16 @@
#
EXE = example_null
SOURCES = main.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
EXTRA_WARNINGS ?= 0
UNITY_BUILD ?= 0
ifeq ($(UNITY_BUILD), 1)
SOURCES = unity_build.cpp
else
SOURCES = main.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
endif
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
UNAME_S := $(shell uname -s)
EXTRA_WARNINGS ?= 0
CXXFLAGS = -I../ -I../../
CXXFLAGS += -g -Wall -Wformat

6
examples/example_null/unity_build.cpp

@ -0,0 +1,6 @@
// Unity build test - build this example as a single compilation unit.
#include "main.cpp"
#include "../../imgui.cpp"
#include "../../imgui_demo.cpp"
#include "../../imgui_draw.cpp"
#include "../../imgui_widgets.cpp"
Loading…
Cancel
Save