update Gradle & Maven wrapper versions. #17
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: Maven native image build | |
on: | |
push: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Build on ${{ matrix.os }} with Java ${{ matrix.java-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
java-version: [17, 21] | |
graalvm-distribution: ['graalvm-community'] | |
fail-fast: false | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Download Liberica NIK ${{ matrix.graalvm-distribution }} for Java ${{ matrix.java-version }} (Linux) | |
if: runner.os == 'Linux' && matrix.java-version == 17 | |
run: | | |
download_url="https://github.com/bell-sw/LibericaNIK/releases/download/23.0.4+1-17.0.11+10/bellsoft-liberica-vm-core-openjdk17.0.11+10-23.0.4+1-linux-amd64.tar.gz" | |
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url | |
- name: Download Liberica NIK ${{ matrix.graalvm-distribution }} for Java ${{ matrix.java-version }} (Linux) | |
if: runner.os == 'Linux' && matrix.java-version == 21 | |
run: | | |
download_url="https://github.com/bell-sw/LibericaNIK/releases/download/23.1.3+2-21.0.3+10/bellsoft-liberica-vm-core-openjdk21.0.3+10-23.1.3+2-linux-amd64.tar.gz" | |
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url | |
- name: Download Liberica NIK ${{ matrix.graalvm-distribution }} for Java ${{ matrix.java-version }} (Windows) | |
if: runner.os == 'Windows' && matrix.java-version == 21 | |
shell: cmd | |
run: | | |
set download_url="https://github.com/bell-sw/LibericaNIK/releases/download/23.1.3+2-21.0.3+10/bellsoft-liberica-vm-core-openjdk21.0.3+10-23.1.3+2-windows-amd64.zip" | |
C:\msys64\usr\bin\wget.exe -O %RUNNER_TEMP%\java_package.zip %download_url% | |
- name: Set up Liberica NIK ${{ matrix.graalvm-distribution }} for Java ${{ matrix.java-version }} (Linux) | |
if: runner.os == 'Linux' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: jdkfile | |
java-version: ${{ matrix.java-version }} | |
jdkFile: ${{ runner.temp }}/java_package.tar.gz | |
architecture: x64 | |
- name: Set up Liberica NIK ${{ matrix.graalvm-distribution }} for Java ${{ matrix.java-version }} (Windows) | |
if: runner.os == 'Windows' && matrix.java-version == 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: jdkfile | |
java-version: ${{ matrix.java-version }} | |
jdkFile: ${{ runner.temp }}/java_package.zip | |
architecture: x64 | |
- name: Set up a Developer Command Prompt for Microsoft Visual C++ (Windows) | |
if: runner.os == 'Windows' && matrix.java-version == 21 | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Set up GraalVM ${{ matrix.graalvm-distribution }} for Java ${{ matrix.java-version }} | |
if: runner.os == 'Windows' && matrix.java-version == 17 | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: ${{ matrix.graalvm-distribution }} | |
- name: Report Java version | |
run: | | |
java -version | |
javac -version | |
- name: Install libxi-dev in Linux | |
if: runner.os == 'Linux' | |
run: sudo apt-get install -y libxi-dev | |
- name: Build with Maven Wrapper (Linux) | |
run: | | |
cd trunk/SwingSet3 | |
./mvnw -V -B package | |
if: runner.os == 'Linux' | |
- name: Build with Maven Wrapper (Windows) | |
run: | | |
cd trunk\SwingSet3 | |
.\mvnw.cmd -V -B package | |
if: runner.os == 'Windows' | |