-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (73 loc) · 2.74 KB
/
build-windows-x86_64.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
name: Build [Windows x86_64]
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
if: ${{ github.event.pull_request.draft == false && (github.event_name == 'workflow_dispatch' || !contains(github.event.head_commit.message, 'noci')) }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: |
22
21
- name: Build libzmq
uses: johnwason/vcpkg-action@v6
with:
pkgs: zeromq[draft]
triplet: x64-windows
token: ${{ github.token }}
github-binarycache: true
- name: Copy built files
run: xcopy /s /i /y "${{ github.workspace }}\vcpkg\installed\x64-windows\*" "${{ github.workspace }}\src\nativeInterop\mingwX64"
- name: Download mpv
run: curl -L https://downloads.sourceforge.net/project/mpv-player-windows/libmpv/mpv-dev-x86_64-20240114-git-bd35dc8.7z --output mpv.7z
- name: Extract mpv
shell: bash
run: |
"/c/Program Files/7-Zip/7z.exe" x mpv.7z -o"src\nativeInterop\mingwX64"
- name: Move libmpv.dll.a
run: move src\nativeInterop\mingwX64\libmpv.dll.a src\nativeInterop\mingwX64\lib\libmpv.dll.a
- name: Move libmpv-2.dll
run: move src\nativeInterop\mingwX64\libmpv-2.dll src\nativeInterop\mingwX64\bin\libmpv-2.dll
- name: Set up Gradle
uses: gradle/gradle-build-action@v3
- name: Build Windows x86_64 minimal binaries
run: .\gradlew.bat app:mingwX64Binaries -PMINIMAL --stacktrace
- name: Upload debug binary
uses: actions/upload-artifact@v3
with:
name: spms-minimal-windows-x86_64-debug
path: app\build\bin\mingwX64\debugExecutable\*.exe
- name: Upload release binary
uses: actions/upload-artifact@v3
with:
name: spms-minimal-windows-x86_64-release
path: app\build\bin\mingwX64\releaseExecutable\*.exe
- name: Build Windows x86_64 full binaries
run: .\gradlew.bat app:mingwX64Binaries --stacktrace
- name: Upload debug binary
uses: actions/upload-artifact@v3
with:
name: spms-windows-x86_64-debug
path: app/app\build\bin\mingwX64\debugExecutable\*.exe
- name: Upload release binary
uses: actions/upload-artifact@v3
with:
name: spms-windows-x86_64-release
path: app/app\build\bin\mingwX64\releaseExecutable\*.exe
- name: Upload DLL dependencies
uses: actions/upload-artifact@v3
with:
name: dependencies
path: app\build\bin\mingwX64\releaseExecutable\*.dll