-
Notifications
You must be signed in to change notification settings - Fork 20
113 lines (110 loc) · 3.85 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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