Add jngl::drawSquare and simplify drawRect implementations #983
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: [push] | |
jobs: | |
clang-cl: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache CPM.cmake packages | |
uses: actions/cache@v4 | |
with: | |
path: .cache/cpm | |
key: cpm | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Configure | |
run: cmake -Bbuild -G"Ninja Multi-Config" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl | |
- name: Build (Debug) | |
run: cmake --build build --config Debug | |
- name: Unittest (Debug) | |
shell: bash | |
working-directory: build | |
# tests like CharacterTest need OpenGL 2.0 and can't run on GitHub Actions runners | |
run: | | |
Debug/jngl-unittest Color | |
Debug/jngl-unittest Rgb | |
Debug/jngl-unittest Drawable | |
Debug/jngl-unittest ImageData | |
Debug/jngl-unittest FinallyTest | |
Debug/jngl-unittest halfLoadTest | |
Debug/jngl-unittest getBinaryPath | |
Debug/jngl-unittest readAsset | |
Debug/jngl-unittest Vec2 | |
- name: Build (Release) | |
run: cmake --build build --config Release | |
- name: Unittest (Release) | |
shell: bash | |
working-directory: build | |
# tests like CharacterTest need OpenGL 2.0 and can't run on GitHub Actions runners | |
run: | | |
Release/jngl-unittest Color | |
Release/jngl-unittest Rgb | |
Release/jngl-unittest Drawable | |
Release/jngl-unittest ImageData | |
Release/jngl-unittest FinallyTest | |
Release/jngl-unittest halfLoadTest | |
Release/jngl-unittest getBinaryPath | |
Release/jngl-unittest readAsset | |
Release/jngl-unittest Vec2 | |
msvc: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache CPM.cmake packages | |
uses: actions/cache@v4 | |
with: | |
path: .cache/cpm | |
key: cpm | |
- name: Configure | |
run: cmake -Bbuild | |
- name: Build (Debug) | |
run: cmake --build build --config Debug | |
- name: Unittest (Debug) | |
shell: bash | |
working-directory: build | |
# tests like CharacterTest need OpenGL 2.0 and can't run on GitHub Actions runners | |
run: | | |
Debug/jngl-unittest Color | |
Debug/jngl-unittest Rgb | |
Debug/jngl-unittest Drawable | |
Debug/jngl-unittest ImageData | |
Debug/jngl-unittest FinallyTest | |
Debug/jngl-unittest halfLoadTest | |
Debug/jngl-unittest getBinaryPath | |
Debug/jngl-unittest readAsset | |
Debug/jngl-unittest Vec2 | |
- name: Build (Release) | |
run: cmake --build build --config Release | |
- name: Unittest (Release) | |
shell: bash | |
working-directory: build | |
# tests like CharacterTest need OpenGL 2.0 and can't run on GitHub Actions runners | |
run: | | |
Release/jngl-unittest Color | |
Release/jngl-unittest Rgb | |
Release/jngl-unittest Drawable | |
Release/jngl-unittest ImageData | |
Release/jngl-unittest FinallyTest | |
Release/jngl-unittest halfLoadTest | |
Release/jngl-unittest getBinaryPath | |
Release/jngl-unittest readAsset | |
Release/jngl-unittest Vec2 | |
- name: Configure (UWP) | |
run: cmake -Bbuild-uwp -DCMAKE_SYSTEM_NAME=WindowsStore '-DCMAKE_SYSTEM_VERSION=10.0' | |
- name: Build (UWP, Debug) | |
run: cmake --build build-uwp --config Debug | |
- name: Build (UWP, Release) | |
run: cmake --build build-uwp --config Release | |
mingw-sdl: | |
runs-on: [ubuntu-latest] | |
container: | |
image: registry.fedoraproject.org/fedora-minimal:40 | |
steps: | |
- name: Install dependencies | |
run: microdnf install -y cmake ninja-build mingw64-pkg-config mingw64-libvorbis mingw64-SDL2 mingw64-fontconfig mingw64-libwebp mingw64-dlfcn mingw32-nsis mingw64-gcc-c++ tar gzip | |
- uses: actions/checkout@v4 | |
- name: Build with CMake and GCC | |
run: | | |
mingw64-cmake -Bbuild-windows -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=0 -DJNGL_SDL2=1 | |
cmake --build build-windows | |
env: | |
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cache/cpm |