From 8beb9eade3ebf17b2a4fcf051dda338d74a9ed18 Mon Sep 17 00:00:00 2001 From: "Gunnar Inge G. Sortland" Date: Wed, 18 Oct 2023 16:03:33 +0200 Subject: [PATCH] Add Github action for building Java --- .github/workflows/java-build-v0.yml | 38 +++++++++++++++++++++++++++++ .github/workflows/java-build-v1.yml | 38 +++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .github/workflows/java-build-v0.yml create mode 100644 .github/workflows/java-build-v1.yml diff --git a/.github/workflows/java-build-v0.yml b/.github/workflows/java-build-v0.yml new file mode 100644 index 0000000..c64004c --- /dev/null +++ b/.github/workflows/java-build-v0.yml @@ -0,0 +1,38 @@ +name: Build v0 Java for all JDKs on all OSes + +on: + push: + branches: + - 'master' + paths-ignore: + - '*.md' + - '.gitignore' + pull_request: + paths-ignore: + - '*.md' + - '.gitignore' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + java_version: [8, 11, 17, 20] + os: [windows-latest, macOS-latest, ubuntu-latest] + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java_version }} + uses: actions/setup-java@v3 + with: + distribution: 'corretto' + java-version: ${{ matrix.java_version }} + - name: Make Maven Wrapper executable + if: contains(matrix.os, 'win') == false + working-directory: ./java + run: chmod +x mvnw + - name: Package + working-directory: ./java + run: ./mvnw --file wgtwo/pom-v0.xml package diff --git a/.github/workflows/java-build-v1.yml b/.github/workflows/java-build-v1.yml new file mode 100644 index 0000000..277b0b3 --- /dev/null +++ b/.github/workflows/java-build-v1.yml @@ -0,0 +1,38 @@ +name: Build v1 Java for all JDKs on all OSes + +on: + push: + branches: + - 'master' + paths-ignore: + - '*.md' + - '.gitignore' + pull_request: + paths-ignore: + - '*.md' + - '.gitignore' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + java_version: [8, 11, 17, 20] + os: [windows-latest, macOS-latest, ubuntu-latest] + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java_version }} + uses: actions/setup-java@v3 + with: + distribution: 'corretto' + java-version: ${{ matrix.java_version }} + - name: Make Maven Wrapper executable + if: contains(matrix.os, 'win') == false + working-directory: ./java + run: chmod +x mvnw + - name: Package + working-directory: ./java + run: ./mvnw --file wgtwo/pom-v1.xml package