CI: Add unity builds test. (#2893)

This commit is contained in:
Rokas Kupstys 2019-11-26 11:24:01 +02:00 committed by omar
parent a8092085b1
commit 1742ca45c5
3 changed files with 23 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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"