Skip to content

Commit

Permalink
Merge pull request #173 from nberth/java-interop-ci4mingw32
Browse files Browse the repository at this point in the history
Use Java 21 on MSYS2, except with mingw32
  • Loading branch information
nberth authored Aug 22, 2024
2 parents 2204418 + 4208d31 commit c531f65
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/windows-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,38 @@ jobs:
mingw-w64-${{matrix.env}}-cc
mingw-w64-${{matrix.env}}-gmp

- name: Check x86 openjdk8 (hotspot)
if: matrix.sys == 'mingw32'
uses: actions/cache@v4
id: openjdk8
with:
path: openjdk8.zip
key: openjdk8
save-always: true

- name: Download x86 openjdk8 (hotspot)
if: matrix.sys == 'mingw32' && steps.openjdk8.outputs.cache-hit != 'true'
run: |
wget -O openjdk8.zip \
"https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u422-b05/OpenJDK8U-jdk_x86-32_windows_hotspot_8u422b05.zip"
shell: msys2 {0}

- name: Unzip x86 openjdk8 (hotspot)
if: matrix.sys == 'mingw32'
run: |
"/c/Program Files/7-Zip/7z.exe" x openjdk8.zip
echo "JAVA_HOME=$(PWD)/jdk8u422-b05"
echo "JAVA_HOME=$(PWD)/jdk8u422-b05" >> ~/.bash_profile
shell: msys2 {0}

- name: Select Java 21
if: matrix.sys != 'mingw32'
run: |
echo "JAVA_HOME=$JAVA_HOME_21_X64"
echo "JAVA_HOME='$(cygpath -u "$JAVA_HOME_21_X64")'" \
>> ~/.bash_profile
shell: msys2 {0}

- name: Set git user
run: |
git config --global user.name github-actions
Expand Down

0 comments on commit c531f65

Please sign in to comment.