From e8325b27287bfb5023b3f90d7914888b19cb78a0 Mon Sep 17 00:00:00 2001 From: "angelo.andreussi" Date: Wed, 29 Nov 2023 15:56:46 +0100 Subject: [PATCH 1/3] removed duplicated useless caching mechanism --- .github/workflows/kapua-ci.yaml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.github/workflows/kapua-ci.yaml b/.github/workflows/kapua-ci.yaml index afe774a7448..1e8eaa07803 100755 --- a/.github/workflows/kapua-ci.yaml +++ b/.github/workflows/kapua-ci.yaml @@ -16,7 +16,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 # Cache local Maven repository to reuse dependencies with: path: ~/.m2/repository @@ -35,7 +34,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -58,7 +56,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -81,7 +78,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -104,7 +100,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -127,7 +122,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -150,7 +144,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -173,7 +166,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -196,7 +188,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -219,7 +210,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -242,7 +232,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -265,7 +254,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -288,7 +276,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -311,7 +298,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -334,7 +320,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -357,7 +342,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -380,7 +364,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -403,7 +386,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -426,7 +408,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -449,7 +430,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -472,7 +452,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository @@ -495,7 +474,6 @@ jobs: with: distribution: 'zulu' java-version: '8' - cache: 'maven' - uses: actions/cache@v3 with: path: ~/.m2/repository From 467e8443586be1e401bfd8f1115998c08b01d93c Mon Sep 17 00:00:00 2001 From: "angelo.andreussi" Date: Wed, 29 Nov 2023 16:39:37 +0100 Subject: [PATCH 2/3] changed cache key for ci configuration --- .github/workflows/kapua-ci.yaml | 44 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/kapua-ci.yaml b/.github/workflows/kapua-ci.yaml index 1e8eaa07803..90ca73b35bd 100755 --- a/.github/workflows/kapua-ci.yaml +++ b/.github/workflows/kapua-ci.yaml @@ -19,7 +19,7 @@ jobs: - uses: actions/cache@v3 # Cache local Maven repository to reuse dependencies with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - run: mvn -v @@ -37,7 +37,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -59,7 +59,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -81,7 +81,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -103,7 +103,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -125,7 +125,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -147,7 +147,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -169,7 +169,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -191,7 +191,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -213,7 +213,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -235,7 +235,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -257,7 +257,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -279,7 +279,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -301,7 +301,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -323,7 +323,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -345,7 +345,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -367,7 +367,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -389,7 +389,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -411,7 +411,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -433,7 +433,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -455,7 +455,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 @@ -477,7 +477,7 @@ jobs: - uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache restore-keys: | ${{ runner.os }}-maven- - run: mvn -B -DskipTests install javadoc:jar From 9f0f7e8cfce0439a5c4dac893207a999286c6d31 Mon Sep 17 00:00:00 2001 From: "angelo.andreussi" Date: Thu, 30 Nov 2023 09:54:51 +0100 Subject: [PATCH 3/3] removed restore keys parameter on ci cache gitaction --- .github/workflows/kapua-ci.yaml | 44 --------------------------------- 1 file changed, 44 deletions(-) diff --git a/.github/workflows/kapua-ci.yaml b/.github/workflows/kapua-ci.yaml index 90ca73b35bd..fb6ed185bea 100755 --- a/.github/workflows/kapua-ci.yaml +++ b/.github/workflows/kapua-ci.yaml @@ -20,8 +20,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - run: mvn -v - run: mvn -B ${BUILD_OPTS} -DskipTests clean install - run: bash <(curl -s https://codecov.io/bash) @@ -38,8 +36,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -60,8 +56,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -82,8 +76,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -104,8 +96,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -126,8 +116,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -148,8 +136,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -170,8 +156,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -192,8 +176,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -214,8 +196,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -236,8 +216,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -258,8 +236,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -280,8 +256,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -302,8 +276,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -324,8 +296,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -346,8 +316,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -368,8 +336,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -390,8 +356,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -412,8 +376,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -434,8 +396,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -456,8 +416,6 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - uses: nick-fields/retry@v2.8.1 with: timeout_minutes: 30 @@ -478,7 +436,5 @@ jobs: with: path: ~/.m2/repository key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache - restore-keys: | - ${{ runner.os }}-maven- - run: mvn -B -DskipTests install javadoc:jar - run: bash <(curl -s https://codecov.io/bash)