-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.71 KB
/
Copy pathbuild-windows-libs.yml
File metadata and controls
52 lines (42 loc) · 1.71 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
name: Bundle Windows GLFW+GLEW headers and libs
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install MinGW and get GLFW/GLEW
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: mingw-w64-x86_64-glfw mingw-w64-x86_64-glew
- name: Copy headers and import libs
shell: msys2 {0}
run: |
mkdir -p libs/windows-x64/include/GLFW
mkdir -p libs/windows-x64/include/GL
# GLFW headers
cp /mingw64/include/GLFW/*.h libs/windows-x64/include/GLFW/
# GLEW headers
cp /mingw64/include/GL/glew.h libs/windows-x64/include/GL/
cp /mingw64/include/GL/wglew.h libs/windows-x64/include/GL/ 2>/dev/null || true
# Import libs (needed at link time)
cp /mingw64/lib/libglfw3.a libs/windows-x64/ 2>/dev/null || true
cp /mingw64/lib/libglfw3dll.a libs/windows-x64/ 2>/dev/null || true
cp /mingw64/lib/libglew32.dll.a libs/windows-x64/ 2>/dev/null || true
cp /mingw64/lib/libglew32.a libs/windows-x64/ 2>/dev/null || true
echo "=== Headers ==="
find libs/windows-x64/include -name "*.h"
echo "=== Libs ==="
ls -lh libs/windows-x64/*.a 2>/dev/null || echo "no .a files"
- name: Commit to repo
shell: bash
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add libs/windows-x64/
git diff --staged --quiet || git commit -m "ci: add bundled GLFW+GLEW headers and import libs for Windows"
git push