From d4c9cb59be1c8f9b0c3f0f748e8076fe295a3630 Mon Sep 17 00:00:00 2001 From: FriwiDev Date: Wed, 17 Nov 2021 01:15:41 +0100 Subject: [PATCH] Use arm64 jdk on windows build --- .github/workflows/build-windows-arm.yml | 2 +- .github/workflows/build.yml | 8 ++++---- scripts/run_windows.bat | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-windows-arm.yml b/.github/workflows/build-windows-arm.yml index 6178ede..72e3e38 100644 --- a/.github/workflows/build-windows-arm.yml +++ b/.github/workflows/build-windows-arm.yml @@ -21,5 +21,5 @@ jobs: name: Build shell: cmd run: | - compile_windows.bat arm64 Release + compile_windows.bat arm64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ef738f..89da6d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,7 +122,7 @@ jobs: name: Build shell: cmd run: | - compile_windows.bat amd64 Release + compile_windows.bat amd64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }} - name: Export distribution uses: actions/upload-release-asset@v1 env: @@ -143,7 +143,7 @@ jobs: name: Build shell: cmd run: | - compile_windows.bat 386 Release + compile_windows.bat 386 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }} - name: Export distribution uses: actions/upload-release-asset@v1 env: @@ -169,7 +169,7 @@ jobs: name: Build run: | chmod +x compile_macosx.sh - ./compile_macosx.sh amd64 Release + ./compile_macosx.sh amd64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }} - name: Export distribution uses: actions/upload-release-asset@v1 env: @@ -204,7 +204,7 @@ jobs: name: Build run: | chmod +x compile_macosx.sh - ./compile_macosx.sh arm64 Release + ./compile_macosx.sh arm64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }} - name: Export distribution uses: actions/upload-release-asset@v1 env: diff --git a/scripts/run_windows.bat b/scripts/run_windows.bat index d858edc..1633d5a 100644 --- a/scripts/run_windows.bat +++ b/scripts/run_windows.bat @@ -26,10 +26,12 @@ if "%TARGETARCH%"=="arm64" (call "C:\Program Files (x86)\Microsoft Visual Studio :: Edit PATH variable on 386 to use 32 bit jdk (cmake findjni does not actually care about JAVA_HOME) if "%TARGETARCH%"=="386" (set "PATH=C:/Program Files (x86)/Java/jdk1.8.0_211;%PATH%") +if "%TARGETARCH%"=="arm64" (move "C:/arm64jdk/jdk-*" "C:/arm64jdk/jdk" && set "PATH=C:/arm64jdk/jdk;%PATH%") :: Perform build -if "%TARGETARCH%"=="386" (cmake -G "Ninja" -DJAVA_HOME="C:/Program Files (x86)/Java/jdk1.8.0_211" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..) ^ -else (cmake -G "Ninja" -DJAVA_HOME="C:/Program Files/Java/jdk1.8.0_211" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..) +if "%TARGETARCH%"=="386" (cmake -G "Ninja" -DJAVA_HOME="C:/Program Files (x86)/Java/jdk1.8.0_211" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..) +if "%TARGETARCH%"=="amd64" (cmake -G "Ninja" -DJAVA_HOME="C:/Program Files/Java/jdk1.8.0_211" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..) +if "%TARGETARCH%"=="arm64" (cmake -G "Ninja" -DJAVA_HOME="C:/arm64jdk/jdk" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..) ninja -j4 :: Compile java classes