-
Notifications
You must be signed in to change notification settings - Fork 48
47 lines (43 loc) · 1.48 KB
/
windows_build.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
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
name: ci
jobs:
build_opengl_backend:
name: OpenGL
strategy:
fail-fast: false
matrix:
window_toolkit: [glfw3, sdl2]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Configure and Build
env:
FG_TOOLKIT: ${{ matrix.window_toolkit }}
run: |
mkdir build && cd build
cmake `
-DCMAKE_TOOLCHAIN_FILE:FILEPATH="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" `
-DFG_USE_WINDOW_TOOLKIT:STRING=$Env:FG_TOOLKIT ..
cmake --build . --parallel --target ALL_BUILD --config Release
cmake --build . --parallel --target INSTALL --config Release
cpack -G NSIS64 -C Release
- name: Upload release binary
if: matrix.window_toolkit == 'glfw3' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_REF: ${{ github.ref }}
run: |
$tokens = $env:GITHUB_REF -split "/"
$tag = $tokens[2]
$ver = $tag.substring(1)
gh release upload $tag ./build/Forge-$ver.exe --clobber