Skip to content

Commit

Permalink
[release/v1.28.x] Cache maven local (#489)
Browse files Browse the repository at this point in the history
* Cache maven local

* cache maven local at PR build time

* Update caching steps

* Only cache patch outputs
  • Loading branch information
bryan-aguilar authored Jul 31, 2023
1 parent 844a3d1 commit f2c2868
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ jobs:
with:
java-version: 17
distribution: temurin

# cache local patch outputs
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: |
~/.m2/repository/io/opentelemetry/
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/**/opentelemetry-java-*.patch') }}

- name: Publish patched dependencies to maven local
uses: ./.github/actions/patch-dependencies
Expand Down Expand Up @@ -308,6 +316,14 @@ jobs:
java-version: 17
distribution: temurin

# cache local patch outputs
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: |
~/.m2/repository/io/opentelemetry/
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/**/opentelemetry-java-*.patch') }}

- uses: gradle/wrapper-validation-action@v1

- name: Configure AWS Credentials
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ jobs:
with:
node-version: 16

# cache local patch outputs
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: |
~/.m2/repository/io/opentelemetry/
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/**/opentelemetry-java-*.patch') }}

# vaadin tests use pnpm
- name: Cache pnpm modules
uses: actions/cache@v3
Expand Down Expand Up @@ -65,6 +73,14 @@ jobs:
java-version: 17
distribution: temurin

# cache local patch outputs
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: |
~/.m2/repository/io/opentelemetry/
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/**/opentelemetry-java-*.patch') }}

- uses: gradle/wrapper-validation-action@v1

- name: Publish patched dependencies to maven local
Expand Down

0 comments on commit f2c2868

Please sign in to comment.