CI: Clarify purpose of example_null, Changelog

This commit is contained in:
omar 2020-03-19 11:10:58 +01:00
parent ac5ffffc23
commit d8824f9a9a
4 changed files with 27 additions and 18 deletions

View File

@ -43,7 +43,7 @@ jobs:
# 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. # 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.
- name: Build example_null (extra warnings, mingw 64-bit) - name: Build example_null (extra warnings, mingw 64-bit)
run: mingw32-make -C examples/example_null EXTRA_WARNINGS=1 run: mingw32-make -C examples/example_null WITH_EXTRA_WARNINGS=1
- name: Build example_null (extra warnings, msvc 64-bit) - name: Build example_null (extra warnings, msvc 64-bit)
shell: cmd shell: cmd
@ -171,22 +171,22 @@ jobs:
- name: Build example_null (extra warnings, gcc 32-bit) - name: Build example_null (extra warnings, gcc 32-bit)
run: | run: |
make -C examples/example_null clean make -C examples/example_null clean
CXXFLAGS="$CXXFLAGS -m32 -Werror" make -C examples/example_null EXTRA_WARNINGS=1 CXXFLAGS="$CXXFLAGS -m32 -Werror" make -C examples/example_null WITH_EXTRA_WARNINGS=1
- name: Build example_null (extra warnings, gcc 64-bit) - name: Build example_null (extra warnings, gcc 64-bit)
run: | run: |
make -C examples/example_null clean make -C examples/example_null clean
CXXFLAGS="$CXXFLAGS -m64 -Werror" make -C examples/example_null EXTRA_WARNINGS=1 CXXFLAGS="$CXXFLAGS -m64 -Werror" make -C examples/example_null WITH_EXTRA_WARNINGS=1
- name: Build example_null (extra warnings, clang 32-bit) - name: Build example_null (extra warnings, clang 32-bit)
run: | run: |
make -C examples/example_null clean make -C examples/example_null clean
CXXFLAGS="$CXXFLAGS -m32 -Werror" CXX=clang++ make -C examples/example_null EXTRA_WARNINGS=1 CXXFLAGS="$CXXFLAGS -m32 -Werror" CXX=clang++ make -C examples/example_null WITH_EXTRA_WARNINGS=1
- name: Build example_null (extra warnings, clang 64-bit) - name: Build example_null (extra warnings, clang 64-bit)
run: | run: |
make -C examples/example_null clean make -C examples/example_null clean
CXXFLAGS="$CXXFLAGS -m64 -Werror" CXX=clang++ make -C examples/example_null EXTRA_WARNINGS=1 CXXFLAGS="$CXXFLAGS -m64 -Werror" CXX=clang++ make -C examples/example_null WITH_EXTRA_WARNINGS=1
- name: Build example_null (freetype) - name: Build example_null (freetype)
run: | run: |
@ -260,7 +260,7 @@ jobs:
brew install sdl2 brew install sdl2
- name: Build example_null (extra warnings, clang 64-bit) - name: Build example_null (extra warnings, clang 64-bit)
run: make -C examples/example_null EXTRA_WARNINGS=1 run: make -C examples/example_null WITH_EXTRA_WARNINGS=1
- name: Build example_null (single file build) - name: Build example_null (single file build)
run: | run: |
@ -358,6 +358,6 @@ jobs:
exit 0 exit 0
fi fi
cd examples/example_null cd examples/example_null
pvs-studio-analyzer trace -- make EXTRA_WARNINGS=1 pvs-studio-analyzer trace -- make WITH_EXTRA_WARNINGS=1
pvs-studio-analyzer analyze -e ../../imstb_rectpack.h -e ../../imstb_textedit.h -e ../../imstb_truetype.h -l ../../pvs-studio.lic -o pvs-studio.log pvs-studio-analyzer analyze -e ../../imstb_rectpack.h -e ../../imstb_textedit.h -e ../../imstb_truetype.h -l ../../pvs-studio.lic -o pvs-studio.log
plog-converter -a 'GA:1,2;OP:1' -t errorfile -w pvs-studio.log plog-converter -a 'GA:1,2;OP:1' -t errorfile -w pvs-studio.log

View File

@ -61,8 +61,8 @@ Other Changes:
in imgui_freetype.cpp (matching support in the regular code path). (#3062) [@DonKult] in imgui_freetype.cpp (matching support in the regular code path). (#3062) [@DonKult]
- Demo: Added black and white and color gradients to Demo>Examples>Custom Rendering. - Demo: Added black and white and color gradients to Demo>Examples>Custom Rendering.
- CI: Added more tests on the continuous-integration server: extra warnings for Clang/GCC, building - CI: Added more tests on the continuous-integration server: extra warnings for Clang/GCC, building
SDL+Metal example, and more compile-time imconfig.h settings: disabling obsolete functions, SDL+Metal example, building imgui_freetype.cpp, more compile-time imconfig.h settings: disabling
enabling 32-bit draw indices, enabling 32-bit ImWchar, disabling demo/metrics, etc. [@rokups] obsolete functions, enabling 32-bit ImDrawIdx, enabling 32-bit ImWchar, disabling demo. [@rokups]
- Backends: Win32: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(), - Backends: Win32: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(),
ImGui_ImplWin32_GetDpiScaleForMonitor() helpers functions (backported from the docking branch). ImGui_ImplWin32_GetDpiScaleForMonitor() helpers functions (backported from the docking branch).
Those functions makes it easier for example apps to support hi-dpi features without setting up Those functions makes it easier for example apps to support hi-dpi features without setting up

View File

@ -153,7 +153,7 @@ Those will allow you to create portable applications and will solve and abstract
--------------------------------------- ---------------------------------------
Building: Building:
Unfortunately in 2018 it is still tedious to create and maintain portable build files using external Unfortunately in 2020 it is still tedious to create and maintain portable build files using external
libraries (the kind we're using here to create a window and render 3D triangles) without relying on libraries (the kind we're using here to create a window and render 3D triangles) without relying on
third party software. For most examples here I choose to provide: third party software. For most examples here I choose to provide:
- Makefiles for Linux/OSX - Makefiles for Linux/OSX
@ -164,6 +164,9 @@ Building:
You can probably just import the imgui_impl_xxx.cpp/.h files into your own codebase or compile those You can probably just import the imgui_impl_xxx.cpp/.h files into your own codebase or compile those
directly with a command-line compiler. directly with a command-line compiler.
If you are interested in using Cmake to build and links examples, see:
https://github.com/ocornut/imgui/pull/1713 and https://github.com/ocornut/imgui/pull/3027
example_allegro5/ example_allegro5/
Allegro 5 example. Allegro 5 example.

View File

@ -2,10 +2,15 @@
# Cross Platform Makefile # Cross Platform Makefile
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
# #
# Important: This is a "null back-end" application, with no visible output or interaction!
# This is used for testing purpose and continuous integration, and has little use for end-user.
#
# Options
WITH_EXTRA_WARNINGS ?= 0
WITH_FREETYPE ?= 0
EXE = example_null EXE = example_null
EXTRA_WARNINGS ?= 0
WITH_FREETYPE ?= 0
SOURCES = main.cpp SOURCES = main.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
@ -15,12 +20,13 @@ CXXFLAGS += -I../ -I../../
CXXFLAGS += -g -Wall -Wformat CXXFLAGS += -g -Wall -Wformat
LIBS = LIBS =
# We use the EXTRA_WARNINGS flag on our CI setup to eagerly catch zealous warnings # We use the WITH_EXTRA_WARNINGS flag on our CI setup to eagerly catch zealous warnings
ifeq ($(EXTRA_WARNINGS), 1) ifeq ($(WITH_EXTRA_WARNINGS), 1)
CXXFLAGS += -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros CXXFLAGS += -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros
endif endif
# We use the WITH_FREETYPE flag on our CI setup to test misc/freetype/imgui_freetype.cpp font rasterizer # We use the WITH_FREETYPE flag on our CI setup to test compiling misc/freetype/imgui_freetype.cpp
# (only supported on Linux, and note that the imgui_freetype code currently won't be executed)
ifeq ($(WITH_FREETYPE), 1) ifeq ($(WITH_FREETYPE), 1)
SOURCES += ../../misc/freetype/imgui_freetype.cpp SOURCES += ../../misc/freetype/imgui_freetype.cpp
CXXFLAGS += $(shell pkg-config --cflags freetype2) CXXFLAGS += $(shell pkg-config --cflags freetype2)
@ -33,7 +39,7 @@ endif
ifeq ($(UNAME_S), Linux) #LINUX ifeq ($(UNAME_S), Linux) #LINUX
ECHO_MESSAGE = "Linux" ECHO_MESSAGE = "Linux"
ifneq ($(EXTRA_WARNINGS), 0) ifneq ($(WITH_EXTRA_WARNINGS), 0)
CXXFLAGS += -Wextra -pedantic CXXFLAGS += -Wextra -pedantic
endif endif
CFLAGS = $(CXXFLAGS) CFLAGS = $(CXXFLAGS)
@ -41,7 +47,7 @@ endif
ifeq ($(UNAME_S), Darwin) #APPLE ifeq ($(UNAME_S), Darwin) #APPLE
ECHO_MESSAGE = "Mac OS X" ECHO_MESSAGE = "Mac OS X"
ifneq ($(EXTRA_WARNINGS), 0) ifneq ($(WITH_EXTRA_WARNINGS), 0)
CXXFLAGS += -Weverything -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-padded -Wno-c++11-long-long CXXFLAGS += -Weverything -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-padded -Wno-c++11-long-long
endif endif
CFLAGS = $(CXXFLAGS) CFLAGS = $(CXXFLAGS)
@ -49,7 +55,7 @@ endif
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
ECHO_MESSAGE = "MinGW" ECHO_MESSAGE = "MinGW"
ifneq ($(EXTRA_WARNINGS), 0) ifneq ($(WITH_EXTRA_WARNINGS), 0)
CXXFLAGS += -Wextra -pedantic CXXFLAGS += -Wextra -pedantic
endif endif
CFLAGS = $(CXXFLAGS) CFLAGS = $(CXXFLAGS)