From 3521e16072d8341fdaf51f9beb27c109bf59341c Mon Sep 17 00:00:00 2001 From: Adam Warski Date: Tue, 1 Dec 2026 08:06:10 +0000 Subject: [PATCH 1/3] CI: restore Maven cache from older keys when pom.xml changes --- .github/workflows/ci.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 302c7400..55e6340d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,15 @@ jobs: with: distribution: 'zulu' java-version: '25' - cache: 'maven' + # Unlike setup-java's cache, falls back to an older cache when pom.xml changes (e.g. dependency update PRs) + - name: Cache Maven repository + uses: actions/cache@v6 + with: + path: | + ~/.m2/repository + !~/.m2/repository/com/softwaremill/jox + key: maven-ci-${{ hashFiles('**/pom.xml') }} + restore-keys: maven-ci- - name: Test run: mvn --batch-mode --update-snapshots verify - name: Prepare release notes @@ -43,7 +51,14 @@ jobs: with: distribution: 'zulu' java-version: '25' - cache: 'maven' + - name: Cache Maven repository + uses: actions/cache@v6 + with: + path: | + ~/.m2/repository + !~/.m2/repository/com/softwaremill/jox + key: maven-fray-${{ hashFiles('**/pom.xml') }} + restore-keys: maven-fray- - name: Install current Jox # so that latest channels code is available run: mvn install -DskipTests=true - name: Run Fray tests (CHANNEL_SIZE=${{ matrix.channel_size }}, JOX_SEGMENT_SIZE=${{ matrix.segment_size }}) From fb78b7052c6199557d39179dfd7c96ae303f4bc2 Mon Sep 17 00:00:00 2001 From: Adam Warski Date: Tue, 1 Dec 2026 08:09:19 +0000 Subject: [PATCH 2/3] CI: start a fresh Maven cache each year --- .github/workflows/ci.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55e6340d..6a79befb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,15 +18,19 @@ jobs: with: distribution: 'zulu' java-version: '25' - # Unlike setup-java's cache, falls back to an older cache when pom.xml changes (e.g. dependency update PRs) + # Unlike setup-java's cache, falls back to an older cache when pom.xml changes (e.g. dependency update PRs). + # The year in the key starts a fresh cache yearly, dropping unused dependency versions. + - name: Get year + id: year + run: echo "year=$(date -u +%Y)" >> "$GITHUB_OUTPUT" - name: Cache Maven repository uses: actions/cache@v6 with: path: | ~/.m2/repository !~/.m2/repository/com/softwaremill/jox - key: maven-ci-${{ hashFiles('**/pom.xml') }} - restore-keys: maven-ci- + key: maven-ci-${{ steps.year.outputs.year }}-${{ hashFiles('**/pom.xml') }} + restore-keys: maven-ci-${{ steps.year.outputs.year }}- - name: Test run: mvn --batch-mode --update-snapshots verify - name: Prepare release notes @@ -51,14 +55,17 @@ jobs: with: distribution: 'zulu' java-version: '25' + - name: Get year + id: year + run: echo "year=$(date -u +%Y)" >> "$GITHUB_OUTPUT" - name: Cache Maven repository uses: actions/cache@v6 with: path: | ~/.m2/repository !~/.m2/repository/com/softwaremill/jox - key: maven-fray-${{ hashFiles('**/pom.xml') }} - restore-keys: maven-fray- + key: maven-fray-${{ steps.year.outputs.year }}-${{ hashFiles('**/pom.xml') }} + restore-keys: maven-fray-${{ steps.year.outputs.year }}- - name: Install current Jox # so that latest channels code is available run: mvn install -DskipTests=true - name: Run Fray tests (CHANNEL_SIZE=${{ matrix.channel_size }}, JOX_SEGMENT_SIZE=${{ matrix.segment_size }}) From fdf35404468d651797098bdea0c828804232da96 Mon Sep 17 00:00:00 2001 From: Adam Warski Date: Tue, 1 Dec 2026 08:17:39 +0000 Subject: [PATCH 3/3] CI: don't cancel other Fray jobs when one fails --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a79befb..170e8f9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,8 @@ jobs: fray-tests: runs-on: ubuntu-26.04 strategy: + # Jobs that pass still save the Maven cache, which a re-run of a failed job can then use + fail-fast: false matrix: channel_size: [ 0, 1, 10 ] segment_size: [ 4, 32 ]