Skip to content

Commit

Permalink
Add Github action for building Java
Browse files Browse the repository at this point in the history
  • Loading branch information
gi-wg2 committed Oct 18, 2023
1 parent d46f4a2 commit 8beb9ea
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/java-build-v0.yml
Original file line number Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions .github/workflows/java-build-v1.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8beb9ea

Please sign in to comment.