From 8d90dcc1d055812aa7fbacf3e9e224e21da10263 Mon Sep 17 00:00:00 2001 From: j-dimension Date: Fri, 1 Dec 2023 19:32:49 +0100 Subject: [PATCH] updated github action to use java 17 --- .github/workflows/main.yml | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ff5734978..dbd47146f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 @@ -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: @@ -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