From 3a14bdf381248895b2a214e81d2a9b117a13da18 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 24 Oct 2022 17:50:33 +0200 Subject: [PATCH 1/6] Update outdated GH Actions versions --- .github/workflows/cibuild.yml | 12 ++++++------ .github/workflows/performance-test.yml | 8 ++++---- .github/workflows/post-merge.yml | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml index 607d4e4b970..977f1f6aaa6 100644 --- a/.github/workflows/cibuild.yml +++ b/.github/workflows/cibuild.yml @@ -22,16 +22,16 @@ jobs: os: [ ubuntu-latest, windows-latest ] steps: # Starting in v2.2 checkout action fetches all tags when fetch-depth=0, for auto-versioning. - - uses: actions/checkout@v2.3.2 + - uses: actions/checkout@v3.1.0 with: fetch-depth: 0 # Java setup step completes very fast, no need to run in a preconfigured docker container - name: Set up JDK 17 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 17 - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -68,15 +68,15 @@ jobs: CONTAINER_REGISTRY_USER: otpbot CONTAINER_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} steps: - - uses: actions/checkout@v2.3.2 + - uses: actions/checkout@v3.1.0 with: fetch-depth: 0 - name: Set up JDK 17 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 17 - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/performance-test.yml b/.github/workflows/performance-test.yml index 32f8816d92d..de5682afa16 100644 --- a/.github/workflows/performance-test.yml +++ b/.github/workflows/performance-test.yml @@ -26,22 +26,22 @@ jobs: jfr-delay: "50s" steps: - - uses: actions/checkout@v2.3.2 + - uses: actions/checkout@v3.1.0 with: fetch-depth: 0 - name: Set up JDK 17 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 17 - name: Set up Maven - uses: stCarolas/setup-maven@v4.2 + uses: stCarolas/setup-maven@v4.5 with: maven-version: 3.8.2 - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/post-merge.yml b/.github/workflows/post-merge.yml index e517c68be2e..085fdcf92d5 100644 --- a/.github/workflows/post-merge.yml +++ b/.github/workflows/post-merge.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 with: token: ${{ secrets.CHANGELOG_TOKEN }} @@ -57,7 +57,7 @@ jobs: git config --global user.email 'serialization-version-bot@opentripplanner.org' - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 with: token: ${{ secrets.CHANGELOG_TOKEN }} From 96562353dafb630d3b61793432758350f8e47ece Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 24 Oct 2022 17:59:48 +0200 Subject: [PATCH 2/6] Add distribution for Java --- .github/workflows/cibuild.yml | 2 ++ .github/workflows/performance-test.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml index 977f1f6aaa6..9f1fe638867 100644 --- a/.github/workflows/cibuild.yml +++ b/.github/workflows/cibuild.yml @@ -30,6 +30,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: 17 + distribution: adopt - name: Cache local Maven repository uses: actions/cache@v3 with: @@ -75,6 +76,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: 17 + distribution: adopt - name: Cache local Maven repository uses: actions/cache@v3 with: diff --git a/.github/workflows/performance-test.yml b/.github/workflows/performance-test.yml index de5682afa16..0870cdc5502 100644 --- a/.github/workflows/performance-test.yml +++ b/.github/workflows/performance-test.yml @@ -34,6 +34,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: 17 + distribution: adopt - name: Set up Maven uses: stCarolas/setup-maven@v4.5 From e1a2d31a34418a749be2d7eb80f56354d7b2b6a6 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 24 Oct 2022 22:47:30 +0200 Subject: [PATCH 3/6] Update stale --- .github/workflows/close_stale_pr_and_issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/close_stale_pr_and_issues.yml b/.github/workflows/close_stale_pr_and_issues.yml index 45a4ed247ba..98619f7e763 100644 --- a/.github/workflows/close_stale_pr_and_issues.yml +++ b/.github/workflows/close_stale_pr_and_issues.yml @@ -13,7 +13,7 @@ jobs: if: github.repository_owner == 'opentripplanner' runs-on: ubuntu-latest steps: - - uses: actions/stale@v5.0.0 + - uses: actions/stale@v6.0.1 id: stale with: stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days' From 5ae35dfc7773cb6499166fa38918fcd5a2a66b7b Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 24 Oct 2022 23:03:50 +0200 Subject: [PATCH 4/6] Use temurin instead of adopt Co-authored-by: Hannes Junnila --- .github/workflows/cibuild.yml | 4 ++-- .github/workflows/performance-test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml index 9f1fe638867..2168e63fc96 100644 --- a/.github/workflows/cibuild.yml +++ b/.github/workflows/cibuild.yml @@ -30,7 +30,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: 17 - distribution: adopt + distribution: temurin - name: Cache local Maven repository uses: actions/cache@v3 with: @@ -76,7 +76,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: 17 - distribution: adopt + distribution: temurin - name: Cache local Maven repository uses: actions/cache@v3 with: diff --git a/.github/workflows/performance-test.yml b/.github/workflows/performance-test.yml index 0870cdc5502..b21c59eae13 100644 --- a/.github/workflows/performance-test.yml +++ b/.github/workflows/performance-test.yml @@ -34,7 +34,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: 17 - distribution: adopt + distribution: temurin - name: Set up Maven uses: stCarolas/setup-maven@v4.5 From 83f93c2dfb3fb278a0e29988d622262752c08aaf Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 24 Oct 2022 23:08:31 +0200 Subject: [PATCH 5/6] Replace separate cache action with built-in functionality --- .github/workflows/cibuild.yml | 17 +++-------------- .github/workflows/performance-test.yml | 7 +------ 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml index 2168e63fc96..66ba0d066b2 100644 --- a/.github/workflows/cibuild.yml +++ b/.github/workflows/cibuild.yml @@ -25,19 +25,14 @@ jobs: - uses: actions/checkout@v3.1.0 with: fetch-depth: 0 + # Java setup step completes very fast, no need to run in a preconfigured docker container - name: Set up JDK 17 uses: actions/setup-java@v3 with: java-version: 17 distribution: temurin - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + cache: maven # on windows there are frequent failures caused by page files being too small # https://github.com/actions/virtual-environments/issues/785 @@ -77,12 +72,6 @@ jobs: with: java-version: 17 distribution: temurin - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + cache: maven - name: Build container image with Jib, push to Dockerhub run: mvn --batch-mode compile com.google.cloud.tools:jib-maven-plugin:build -Djib.to.tags=latest,${{ github.sha }} diff --git a/.github/workflows/performance-test.yml b/.github/workflows/performance-test.yml index b21c59eae13..7097dd5bfef 100644 --- a/.github/workflows/performance-test.yml +++ b/.github/workflows/performance-test.yml @@ -35,18 +35,13 @@ jobs: with: java-version: 17 distribution: temurin + cache: maven - name: Set up Maven uses: stCarolas/setup-maven@v4.5 with: maven-version: 3.8.2 - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - - name: Build jar run: mvn -DskipTests --batch-mode package -P prettierSkip From 57bd5e2004fdc5e6deac749ab9dbf794d6069f94 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 28 Oct 2022 18:57:47 +0200 Subject: [PATCH 6/6] Update pagefile action --- .github/workflows/cibuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml index 66ba0d066b2..e6574346cd5 100644 --- a/.github/workflows/cibuild.yml +++ b/.github/workflows/cibuild.yml @@ -38,7 +38,7 @@ jobs: # https://github.com/actions/virtual-environments/issues/785 - name: Configure Windows Pagefile if: matrix.os == 'windows-latest' - uses: al-cheb/configure-pagefile-action@v1.2 + uses: al-cheb/configure-pagefile-action@v1.3 - name: Prepare coverage agent, build and test run: mvn --batch-mode --update-snapshots jacoco:prepare-agent verify jacoco:report -P prettierCheck