Add JVM target #119
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |