Skip to content

Commit

Permalink
CI: MingW for sdl & glfw - Add CI for TestEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Dec 20, 2023
1 parent 33f2a3e commit 9a1c72e
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 7 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/MinGW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
window_backend: [ Glfw, Sdl ]

steps:
- uses: actions/checkout@master
- name: Checkout submodules
Expand All @@ -28,12 +33,23 @@ jobs:
run: |
mkdir build_x86_64
cd build_x86_64
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw_x86_64.cmake
if [ "${{ matrix.window_backend }}" = "Sdl" ]; then
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw_x86_64.cmake -DCMAKE_BUILD_TYPE=Release -DHELLOIMGUI_USE_SDL_OPENGL3=ON
fi
if [ "${{ matrix.window_backend }}" = "Glfw" ]; then
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw_x86_64.cmake -DCMAKE_BUILD_TYPE=Release
fi
make -j 4
- name: Build i686
run: |
mkdir build_i686
cd build_i686
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw_i686.cmake
make -j 4
if [ "${{ matrix.window_backend }}" = "Sdl" ]; then
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw_i686.cmake -DCMAKE_BUILD_TYPE=Release -DHELLOIMGUI_USE_SDL_OPENGL3=ON
fi
if [ "${{ matrix.window_backend }}" = "Glfw" ]; then
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw_i686.cmake -DCMAKE_BUILD_TYPE=Release
fi
make -j 4
35 changes: 35 additions & 0 deletions .github/workflows/TestEngine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "TestEngine"

# Test that a build with ImGui Test Engine works

on:
workflow_dispatch:
pull_request:
push:


jobs:
build:
name: Test
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: apt install xorg-dev libglfw3-dev (ubuntu only)
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y xorg-dev libglfw3-dev

- name: Build and install
shell: bash
run: |
mkdir build
cd build
cmake .. -DHELLOIMGUI_WITH_TEST_ENGINE=ON -DCMAKE_BUILD_TYPE=Release
cmake --build . -j 3
13 changes: 9 additions & 4 deletions .github/workflows/Win_Mac_Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ on:

jobs:
build:
name: Cpp Lib ${{matrix.platform}} TestNg:${{matrix.test_engine}}
name: Cpp
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
test_engine: [ON, OFF]
window_backend: [ Glfw, Sdl ]

steps:
- uses: actions/checkout@v3
Expand All @@ -25,12 +25,17 @@ jobs:

- name: apt install xorg-dev libglfw3-dev (ubuntu only)
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y xorg-dev libglfw3-dev
run: sudo apt-get update && sudo apt-get install -y xorg-dev libglfw3-dev libsdl2-dev

- name: Build and install
shell: bash
run: |
mkdir build
cd build
cmake .. -DHELLOIMGUI_WITH_TEST_ENGINE=${{ matrix.test_engine }} -DCMAKE_BUILD_TYPE=Release
if [ "${{ matrix.window_backend }}" = "Sdl" ]; then
cmake .. -DHELLOIMGUI_USE_SDL_OPENGL3=ON -DCMAKE_BUILD_TYPE=Release
fi
if [ "${{ matrix.window_backend }}" = "Glfw" ]; then
cmake .. -DCMAKE_BUILD_TYPE=Release
fi
cmake --build . -j 3
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Android](https://github.com/pthom/hello_imgui/workflows/Android/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/Android.yml)
[![Emscripten](https://github.com/pthom/hello_imgui/workflows/Emscripten/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/Emscripten.yml)
[![StarterTemplate](https://github.com/pthom/hello_imgui/workflows/StarterTemplate/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/StarterTemplate.yml)
[![TestEngine](https://github.com/pthom/hello_imgui/workflows/TestEngine/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/TestEngine.yml)
[![Automate](https://github.com/pthom/hello_imgui/workflows/Automate/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/Automate.yml)
[![Metal](https://github.com/pthom/hello_imgui/workflows/Metal/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/Metal.yml)

Expand Down
1 change: 1 addition & 0 deletions README.src.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Android](https://github.com/pthom/hello_imgui/workflows/Android/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/Android.yml)
[![Emscripten](https://github.com/pthom/hello_imgui/workflows/Emscripten/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/Emscripten.yml)
[![StarterTemplate](https://github.com/pthom/hello_imgui/workflows/StarterTemplate/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/StarterTemplate.yml)
[![TestEngine](https://github.com/pthom/hello_imgui/workflows/TestEngine/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/TestEngine.yml)
[![Automate](https://github.com/pthom/hello_imgui/workflows/Automate/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/Automate.yml)
[![Metal](https://github.com/pthom/hello_imgui/workflows/Metal/badge.svg)](https://github.com/pthom/hello_imgui/actions/workflows/Metal.yml)

Expand Down

0 comments on commit 9a1c72e

Please sign in to comment.