Skip to content
name: Build [Windows x86_64]
on:
push:
branches: [ "main", "test" ]
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 17
uses: actions/setup-java@v3
with:
java-version: '17'
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 }}\src\nativeInterop\windows-x86_64"
- 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\windows-x86_64"
- name: Move libmpv.dll.a
run: move src\nativeInterop\windows-x86_64\libmpv.dll.a src\nativeInterop\windows-x86_64\lib\libmpv.dll.a
- name: Move libmpv-2.dll
run: move src\nativeInterop\windows-x86_64\libmpv-2.dll src\nativeInterop\windows-x86_64\bin\libmpv-2.dll
- name: Set up Gradle
uses: gradle/gradle-build-action@v3
- name: Build windows-x86_64 binaries
run: .\gradlew.bat windows-x86_64Binaries -PLINK_STATIC
- name: Upload debug binary
uses: actions/upload-artifact@v3
with:
name: spms-windows-x86_64-debug
path: build\bin\windows-x86_64\debugExecutable\*.exe
- name: Upload release binary
uses: actions/upload-artifact@v3
with:
name: spms-windows-x86_64-release
path: build\bin\windows-x86_64\releaseExecutable\*.exe
- name: Build windows-x86_64 binaries without mpv
run: .\gradlew.bat windows-x86_64Binaries -PLINK_STATIC -PDISABLE_MPV
- name: Upload debug binary
uses: actions/upload-artifact@v3
with:
name: spms-nompv-windows-x86_64-debug
path: build\bin\windows-x86_64\debugExecutable\*.exe
- name: Upload release binary
uses: actions/upload-artifact@v3
with:
name: spms-nompv-windows-x86_64-release
path: build\bin\windows-x86_64\releaseExecutable\*.exe
- name: Upload DLL dependencies
uses: actions/upload-artifact@v3
with:
name: dependencies
path: build\bin\windows-x86_64\releaseExecutable\*.dll