From 347493f20d4bc3666eddfa4051d79c83c5283d6e Mon Sep 17 00:00:00 2001 From: Patrick Hobusch Date: Wed, 1 Nov 2023 17:22:07 +0800 Subject: [PATCH] Upgrade Ubuntu, Java and GitHub Actions versions Also configure Maven to compile for Java 8 to make plugin working on Crowd instances running with Java 8, and keep the integration tests running with Java 11 due to the incompatibility of Crowd and thus the tests with Java 17. --- .github/workflows/ci.yaml | 62 +++++++++++++++++++++------------------ pom.xml | 5 ++-- 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8dbc85c..bf663b7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,19 +11,20 @@ on: jobs: package: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: temurin - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache Maven packages - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2 key: confapi-plugin-${{ hashFiles('**/pom.xml') }} @@ -38,23 +39,24 @@ jobs: unit-tests: needs: package - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} steps: - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: temurin - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache Maven package - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2 key: confapi-plugin-${{ hashFiles('**/pom.xml') }} @@ -66,19 +68,21 @@ jobs: integration-tests: needs: package - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: + # Crowd and thus the integration tests are not compatible with Java 17 java-version: 11 + distribution: temurin - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache Maven package - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2 key: confapi-plugin-${{ hashFiles('**/pom.xml') }} @@ -92,7 +96,7 @@ jobs: if: github.event_name == 'push' # to 'main' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} @@ -104,16 +108,17 @@ jobs: SIGN_ASC_IV: ${{ secrets.SIGN_ASC_IV }} steps: - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: temurin - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache Maven package - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2 key: confapi-plugin-${{ hashFiles('**/pom.xml') }} @@ -131,19 +136,20 @@ jobs: apcc: needs: package - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: temurin - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache Maven package - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2 key: confapi-plugin-${{ hashFiles('**/pom.xml') }} diff --git a/pom.xml b/pom.xml index 57bd3c0..9d7f0ec 100644 --- a/pom.xml +++ b/pom.xml @@ -68,8 +68,9 @@ 2.1.5 0.0.34 2.0.1 - 11 - 11 + + 8 + 8 UTF-8 UTF-8