From e49ea6e68e74958efaed11968580cd82aa867642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnar=20Inge=20Gj=C3=B8vik=20Sortland?= Date: Fri, 20 Oct 2023 11:28:11 +0200 Subject: [PATCH] Add Github action for building Java (#44) --- .github/workflows/java-build-v0.yml | 36 +++++++++++++++++++++++++++++ .github/workflows/java-build-v1.yml | 36 +++++++++++++++++++++++++++++ 2 files changed, 72 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..b0e8f87 --- /dev/null +++ b/.github/workflows/java-build-v0.yml @@ -0,0 +1,36 @@ +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, 21] + os: [windows-latest, macOS-latest, ubuntu-latest] + + steps: + - name: Checkout + uses: actions/checkout@v4 + - 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 + run: chmod +x mvnw + - name: Package + 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..f915184 --- /dev/null +++ b/.github/workflows/java-build-v1.yml @@ -0,0 +1,36 @@ +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, 21] + os: [windows-latest, macOS-latest, ubuntu-latest] + + steps: + - name: Checkout + uses: actions/checkout@v4 + - 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 + run: chmod +x mvnw + - name: Package + run: ./mvnw --file wgtwo/pom-v1.xml package