Skip to content

Commit

Permalink
Simplify github-actions build.
Browse files Browse the repository at this point in the history
Signed-off-by: Sjoerd Talsma <sjoerdtalsma@users.noreply.github.com>
  • Loading branch information
sjoerdtalsma committed Oct 12, 2024
1 parent dde1af5 commit 183fe44
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 56 deletions.
23 changes: 0 additions & 23 deletions .github/mvn-toolchains.xml

This file was deleted.

48 changes: 15 additions & 33 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup GPG
Expand All @@ -25,35 +25,24 @@ jobs:
env:
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
- name: Setup Graphviz
run: sudo apt-get install graphviz
- name: Set up JDK 8 for compiling Java 8 compatible bytecode
id: setup-java-8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
java-package: jdk
- name: Set up JDK 11 to support jigsaw module system
id: setup-java-11
uses: actions/setup-java@v3
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
java-package: jdk
- name: Setup maven cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-repo-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-repo-
java-version: |
8
21
mvn-toolchain-id: |
jdk8
jdk21
cache: 'maven'
- name: Perform build
run: .github/scripts/build.sh
shell: bash
env:
JAVA_8_HOME: ${{ steps.setup-java-8.outputs.path }}
JAVA_11_HOME: ${{ steps.setup-java-11.outputs.path }}
MAVEN_CLI_OPTS: --settings .github/mvn-settings.xml --global-toolchains .github/mvn-toolchains.xml
MAVEN_CLI_OPTS: --settings .github/mvn-settings.xml
GPG_EXECUTABLE: /usr/bin/gpg
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
Expand Down Expand Up @@ -83,20 +72,13 @@ jobs:
run: |
git config user.name "Talsma CI"
git config user.email "ci-user@talsma-ict.nl"
- name: Set up JDK
- name: Set up Java
if: env.GH_TOKEN != null
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
java-package: jdk
- name: Set up maven cache
if: env.GH_TOKEN != null
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-repo-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-repo-
java-version: 21
cache: 'maven'
- name: Perform optional release
if: env.GH_TOKEN != null
run: .github/scripts/release.sh
Expand Down

0 comments on commit 183fe44

Please sign in to comment.