Skip to content

Commit

Permalink
updated github action to use java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Dec 1, 2023
1 parent 6c86f51 commit 8d90dcc
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: '11' # The JDK version to make available on the path.
distribution: 'liberica'
java-version: '17' # The JDK version to make available on the path.
java-package: jdk+fx # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64

Expand All @@ -48,23 +49,8 @@ jobs:
wget -O /home/runner/j-lawyer-backup/backups.tar.gz https://www.j-lawyer.org/downloads/travisci/backups/backups.tar.gz
tar -m -xvzf /home/runner/j-lawyer-backup/backups.tar.gz -C /home/runner/j-lawyer-backup
# - name: Set up JDK8
# uses: AdoptOpenJDK/install-jdk@v1
# with:
# version: '8'
# architecture: x64
- name: Set up JDK11
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '11'
architecture: x64
targets: 'JDK_11'

- name: populate JAVA_HOME to Java 11
run: echo "JAVA_HOME=$(echo $JDK_11)" >> $GITHUB_ENV

- name: Build server with JDK8
- name: Build server
# ejb tests fail for some reason...
# run: ant -buildfile j-lawyer-fax/build.xml default && ant -buildfile j-lawyer-server-common/build.xml default && ant -Dj2ee.server.home=/home/travis -buildfile j-lawyer-server-entities/build.xml default && ant -buildfile j-lawyer-server-api/build.xml default && ant -Dj2ee.server.home=/home/travis -buildfile j-lawyer-server/build.xml default test && ant -buildfile j-lawyer-io-common/build.xml default
run: ant -buildfile j-lawyer-fax/build.xml default && ant -buildfile j-lawyer-server-common/build.xml default && ant -Dj2ee.server.home=/home/travis -buildfile j-lawyer-server-entities/build.xml default && ant -buildfile j-lawyer-server-api/build.xml default && ant -Dplatforms.default_platform.home=$JDK_11 -Dj2ee.server.home=/home/travis -buildfile j-lawyer-server/build.xml default && ant -buildfile j-lawyer-io-common/build.xml default
Expand All @@ -82,17 +68,8 @@ jobs:
datadirectory: /home/runner/j-lawyer-data
encryptionpwd:

# - name: Set up JDK11
# uses: AdoptOpenJDK/install-jdk@v1
# with:
# version: '11'
# architecture: x64
# targets: 'JDK_11'
#
# - name: populate JAVA_HOME to Java 11
# run: echo "JAVA_HOME=$(echo $JDK_11)" >> $GITHUB_ENV

- name: Build client with JDK11
- name: Build client
run: ant -buildfile j-lawyer-client/build.xml default
# removed temporarily: && mvn -f j-lawyer-backupmgr/pom.xml clean package test
env:
Expand All @@ -117,7 +94,7 @@ jobs:
-Dsonar.projectName=j-lawyer-org
-Dsonar.projectVersion=2.6.0
-Dsonar.java.binaries=.
-Dsonar.java.source=8
-Dsonar.java.source=17
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down

0 comments on commit 8d90dcc

Please sign in to comment.