Skip to content

Commit f2c424a

Browse files
authored
[DX-3383] Optimize Docker Caching (#21705)
* actions/checkout update * use cache-scope and max mode * Check results * Actually use proper cache creation * Check for cache * Remove extra go mod download * ACTUALLY remove extra docker download * Fix pipefall * Cache go modules as part of docker layers * Check results * Optimize Dockerfile * Test Optimize Dockerfile * zstd and no free disk space * Test zstd and no free disk space * Test with cheaper runner * Revert smaller runner as it was 1m increase * Plugins cache * Test plugins cache * Re-run * Suggestions * Check results * Plugins cache * update setup-go * remove git config * Move dependency overrides out of Dockerfile * Test new flow * New cache * Better cache ordering * Caching and comments * Test just using docker caching for plugins * See caching * Use version
1 parent 87972ba commit f2c424a

33 files changed

Lines changed: 184 additions & 144 deletions

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ tmp/
1111
contracts/node_modules
1212
examples/
1313

14+
.changeset/
15+
.github/
16+
docs/
17+
fuzz/
18+
1419
devenv/
1520
deployment/
1621
integration/

.github/actions/golangci-lint/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ runs:
2727
using: composite
2828
steps:
2929
- name: Checkout repo (full)
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v6
3131
# Only do a full checkout on merge_groups
3232
if: github.event_name == 'merge_group'
3333
with:
3434
persist-credentials: false
3535
fetch-depth: 0
3636

3737
- name: Checkout repo
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v6
3939
if: github.event_name != 'merge_group'
4040
with:
4141
persist-credentials: false
@@ -109,7 +109,7 @@ runs:
109109
- name: Store Golangci-lint report artifact
110110
if: always()
111111
id: upload-artifact
112-
uses: actions/upload-artifact@v4
112+
uses: actions/upload-artifact@v7
113113
with:
114114
# Use a unique suffix for each lint report artifact to avoid duplication errors
115115
name: golangci-lint-report-${{ steps.suffix.outputs.suffix }}

.github/actions/setup-go/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ runs:
4949
echo "version=$version" >> "$GITHUB_OUTPUT"
5050
5151
- name: Set up Go
52-
uses: actions/setup-go@v5
52+
uses: actions/setup-go@v6
5353
with:
5454
go-version: ${{ steps.go-version.outputs.version }}
5555
cache: false

.github/actions/setup-solana/build-contracts/action.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ runs:
1010
using: composite
1111
steps:
1212
- name: Checkout chainlink-ccip
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v6
1414
with:
1515
repository: smartcontractkit/chainlink-ccip
1616
path: chainlink-ccip
@@ -57,7 +57,6 @@ runs:
5757
echo "exists=false" >> $GITHUB_ENV
5858
fi
5959
60-
6160
- name: Download artifact if it exists
6261
if: env.exists == 'true'
6362
shell: bash
@@ -77,7 +76,7 @@ runs:
7776
- name: Upload artifact (if newly built)
7877
if: env.exists == 'false'
7978
continue-on-error: true # don't fail if the upload fails, it might conflict with another job
80-
uses: actions/upload-artifact@v4
79+
uses: actions/upload-artifact@v7
8180
with:
8281
name: ${{ env.ARTIFACT_NAME }}
8382
path: chainlink-ccip/chains/solana/contracts/target/deploy/*.so

.github/workflows/bash-scripts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
bash-scripts-src: ${{ steps.bash-scripts.outputs.src }}
1212
steps:
1313
- name: Checkout the repo
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515
with:
1616
persist-credentials: false
1717
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
@@ -27,7 +27,7 @@ jobs:
2727
needs: [changes]
2828
steps:
2929
- name: Checkout the repo
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v6
3131
with:
3232
persist-credentials: false
3333
- name: Run ShellCheck

.github/workflows/build-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
prerelease-phase: ${{ steps.detect-prerelease-phase.outputs.prerelease-phase }}
2121
is-hotfix: ${{ steps.detect-hotfix.outputs.is-hotfix }}
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v6
2424
with:
2525
persist-credentials: false
2626

.github/workflows/chain-selectors-check.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ on:
1111
branches:
1212
- release/*
1313

14-
1514
jobs:
1615
verify-version:
1716
runs-on: ubuntu-latest
1817
steps:
1918
- name: Checkout Repo
20-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
2120
with:
2221
persist-credentials: false
2322

.github/workflows/changeset.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v6
3333
with:
3434
persist-credentials: false
3535
fetch-depth: 0
@@ -93,7 +93,7 @@ jobs:
9393
run: echo "top_level_dir=$(pwd)" >> $GITHUB_OUTPUT
9494

9595
- name: Checkout .Github repository
96-
uses: actions/checkout@v4
96+
uses: actions/checkout@v6
9797
with:
9898
persist-credentials: false
9999
repository: smartcontractkit/.github

.github/workflows/changesets-preview-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
pull-requests: write
1818
steps:
1919
- name: Checkout repository
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v6
2121
with:
2222
persist-credentials: false
2323

.github/workflows/ci-core.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Checkout the repo
47-
uses: actions/checkout@v4
47+
uses: actions/checkout@v6
4848
with:
4949
persist-credentials: false
5050
repository: smartcontractkit/chainlink
@@ -112,7 +112,7 @@ jobs:
112112
113113
golangci:
114114
name: GolangCI Lint
115-
needs: [filter, run-frequency ]
115+
needs: [filter, run-frequency]
116116
# We don't directly merge dependabot PRs to not waste the resources.
117117
if: ${{ needs.filter.outputs.affected-modules != '[]' && github.event_name != 'merge_group' && github.actor != 'dependabot[bot]' }}
118118
permissions:
@@ -133,7 +133,7 @@ jobs:
133133
metrics: cpu,network,memory,disk
134134

135135
- name: Checkout
136-
uses: actions/checkout@v4
136+
uses: actions/checkout@v6
137137
with:
138138
persist-credentials: false
139139

@@ -238,7 +238,7 @@ jobs:
238238
name: Core Tests (${{ matrix.type.cmd }}) # Be careful modifying the job name, as it is used to fetch the job URL
239239
# We don't directly merge dependabot PRs, so let's not waste the resources
240240
if: ${{ github.actor != 'dependabot[bot]' }}
241-
needs: [filter, run-frequency ]
241+
needs: [filter, run-frequency]
242242
timeout-minutes: 60
243243
# Use ubuntu-latest for jobs that will be skipped
244244
runs-on: ${{ matrix.type.should-run == 'true' && matrix.type.os || 'ubuntu-latest' }}
@@ -254,7 +254,7 @@ jobs:
254254

255255
- name: Checkout the repo
256256
if: ${{ matrix.type.should-run == 'true' }}
257-
uses: actions/checkout@v4
257+
uses: actions/checkout@v6
258258
with:
259259
persist-credentials: false
260260

@@ -376,7 +376,7 @@ jobs:
376376

377377
- name: Store logs artifacts
378378
if: ${{ always() && matrix.type.should-run == 'true' }}
379-
uses: actions/upload-artifact@v4
379+
uses: actions/upload-artifact@v7
380380
with:
381381
name: ${{ matrix.type.cmd }}_logs
382382
path: |
@@ -411,7 +411,7 @@ jobs:
411411
if: ${{ needs.filter.outputs.should-run-core-tests == 'true' }}
412412
steps:
413413
- name: Checkout
414-
uses: actions/checkout@v4
414+
uses: actions/checkout@v6
415415

416416
- name: Setup Go
417417
uses: ./.github/actions/setup-go
@@ -426,7 +426,7 @@ jobs:
426426

427427
- name: Store test report artifacts
428428
if: ${{ always() }}
429-
uses: actions/upload-artifact@v4
429+
uses: actions/upload-artifact@v7
430430
with:
431431
name: go_core_scripts_tests_logs
432432
path: |
@@ -442,7 +442,7 @@ jobs:
442442
runs-on: ubuntu-latest
443443
steps:
444444
- name: Checkout the repo
445-
uses: actions/checkout@v4
445+
uses: actions/checkout@v6
446446
with:
447447
persist-credentials: false
448448
fetch-depth: 0 # fetches all history for all tags and branches to provide more metadata for sonar reports
@@ -545,7 +545,7 @@ jobs:
545545
run:
546546
shell: bash
547547
steps:
548-
- uses: actions/checkout@v4
548+
- uses: actions/checkout@v6
549549
with:
550550
persist-credentials: false
551551
- name: Setup Go
@@ -604,7 +604,7 @@ jobs:
604604
name: Misc
605605
runs-on: ubuntu-latest
606606
steps:
607-
- uses: actions/checkout@v4
607+
- uses: actions/checkout@v6
608608
with:
609609
persist-credentials: false
610610
- name: Setup go

0 commit comments

Comments
 (0)