Skip to content
name: Build [Windows x86_64]
on:
push:
branches: [ "main", "windows-workflow" ]
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 and 22
uses: actions/setup-java@v3
with:
java-version: |
22
21
distribution: 'temurin'
- 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 }}\library\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"library\src\nativeInterop\mingwX64"
- name: Move libmpv.dll.a
run: move library\src\nativeInterop\mingwX64\libmpv.dll.a library\src\nativeInterop\mingwX64\lib\libmpv.dll.a
- name: Move libmpv-2.dll
run: move library\src\nativeInterop\mingwX64\libmpv-2.dll library\src\nativeInterop\mingwX64\bin\libmpv-2.dll
- name: Download reference Linux packages
uses: egor-tensin/setup-cygwin@v4
with:
install-dir: C:\cygwin64
packages: libayatana-appindicator3-devel
- name: Set up Gradle
uses: gradle/gradle-build-action@v3
- name: Build Windows x86_64 minimal binaries
run: .\gradlew.bat mingwX64Binaries -PMINIMAL --stacktrace
- name: Upload debug binary
uses: actions/upload-artifact@v3
with:
name: spms-minimal-mingwX64-debug
path: app\build\bin\mingwX64\debugExecutable\*.exe
- name: Upload release binary
uses: actions/upload-artifact@v3
with:
name: spms-minimal-mingwX64-release
path: app\build\bin\mingwX64\releaseExecutable\*.exe
- name: Build Windows x86_64 full binaries
run: .\gradlew.bat mingwX64Binaries --stacktrace
- name: Upload debug binary
uses: actions/upload-artifact@v3
with:
name: spms-mingwX64-debug
path: app\build\bin\mingwX64\debugExecutable\*.exe
- name: Upload release binary
uses: actions/upload-artifact@v3
with:
name: spms-mingwX64-release
path: 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