-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (79 loc) · 2.81 KB
/
Copy pathwindows-msvc.yml
File metadata and controls
95 lines (79 loc) · 2.81 KB
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
name: Windows MSVC Build
on:
workflow_dispatch:
jobs:
build:
name: Windows MSVC
runs-on: windows-latest
env:
VCPKG_DIR: ${{ github.workspace }}\vcpkg
VCPKG_DEFAULT_TRIPLET: x64-windows-static
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\vcpkg-cache,readwrite"
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: recursive
- name: Checkout vcpkg
uses: actions/checkout@v5
with:
repository: microsoft/vcpkg
path: vcpkg
fetch-depth: 1
- name: Checkout Khronos OpenGL Registry
uses: actions/checkout@v5
with:
repository: KhronosGroup/OpenGL-Registry
path: third_party/khronos/OpenGL-Registry
fetch-depth: 1
- name: Checkout Khronos EGL Registry
uses: actions/checkout@v5
with:
repository: KhronosGroup/EGL-Registry
path: third_party/khronos/EGL-Registry
fetch-depth: 1
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Check Ninja
shell: cmd
run: ninja --version
- name: Cache vcpkg binary packages
uses: actions/cache@v5
with:
path: ${{ github.workspace }}\vcpkg-cache
key: vcpkg-${{ runner.os }}-${{ env.VCPKG_DEFAULT_TRIPLET }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-${{ runner.os }}-${{ env.VCPKG_DEFAULT_TRIPLET }}-
- name: Bootstrap vcpkg
shell: cmd
run: call "%VCPKG_DIR%\bootstrap-vcpkg.bat" -disableMetrics
- name: Prepare Khronos OpenGL headers
shell: cmd
run: |
mkdir third_party\DPF\khronos\GL third_party\DPF\khronos\KHR
copy /Y third_party\khronos\OpenGL-Registry\api\GL\glext.h third_party\DPF\khronos\GL\glext.h
copy /Y third_party\khronos\EGL-Registry\api\KHR\khrplatform.h third_party\DPF\khronos\KHR\khrplatform.h
findstr /C:"PFNGLACTIVETEXTUREPROC" third_party\DPF\khronos\GL\glext.h
- name: Configure
shell: cmd
run: |
cmake -S . -B build -G Ninja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_TOOLCHAIN_FILE="%VCPKG_DIR%\scripts\buildsystems\vcpkg.cmake" ^
-DVCPKG_TARGET_TRIPLET="%VCPKG_DEFAULT_TRIPLET%" ^
-DMSVC_RUNTIME_LIBRARY=MultiThreaded
- name: Build
shell: cmd
run: cmake --build build --config Release --parallel
- name: Test
shell: cmd
run: ctest --test-dir build --build-config Release --output-on-failure
- name: Upload plugin artifacts
uses: actions/upload-artifact@v6
with:
name: GameControllerMIDI-windows-msvc
path: |
build/bin/*
if-no-files-found: warn