Skip to content

Commit b06c340

Browse files
authored
fix(docker-build*/action.yaml): fix ccache, apt-get and container registry cache keys (#6096)
* fix cache key Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp> * fix cache-from Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp> --------- Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
1 parent d002f92 commit b06c340

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/actions/docker-build-and-push-cuda/action.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@ runs:
3737
with:
3838
path: |
3939
root-ccache
40-
key: ccache-${{ inputs.platform }}-${{ hashFiles('src/**/*.cpp') }}
40+
key: ccache-${{ inputs.platform }}-main-${{ inputs.platform == 'arm64' && 'arm64-' || '' }}${{ hashFiles('src/**/*.cpp') }}
4141
restore-keys: |
42+
ccache-${{ inputs.platform }}-main-${{ inputs.platform == 'arm64' && 'arm64-' || '' }}
4243
ccache-${{ inputs.platform }}-
4344
4445
- name: Restore apt-get
4546
uses: actions/cache/restore@v4
4647
with:
4748
path: |
4849
var-cache-apt
49-
key: apt-get-${{ inputs.platform }}-${{ hashFiles('src/**/package.xml') }}
50+
key: apt-get-${{ inputs.platform }}-main-${{ inputs.platform == 'arm64' && 'arm64-' || '' }}${{ hashFiles('src/**/package.xml') }}
5051
restore-keys: |
52+
apt-get-${{ inputs.platform }}-main-${{ inputs.platform == 'arm64' && 'arm64-' || '' }}
5153
apt-get-${{ inputs.platform }}-
5254
5355
- name: Inject cache into docker

.github/actions/docker-build-and-push/action.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,18 @@ runs:
3737
with:
3838
path: |
3939
root-ccache
40-
key: ccache-${{ inputs.platform }}-${{ hashFiles('src/**/*.cpp') }}
40+
key: ccache-${{ inputs.platform }}-main-${{ inputs.platform == 'arm64' && 'arm64-' || '' }}${{ hashFiles('src/**/*.cpp') }}
4141
restore-keys: |
42+
ccache-${{ inputs.platform }}-main-${{ inputs.platform == 'arm64' && 'arm64-' || '' }}
4243
ccache-${{ inputs.platform }}-
43-
4444
- name: Restore apt-get
4545
uses: actions/cache/restore@v4
4646
with:
4747
path: |
4848
var-cache-apt
49-
key: apt-get-${{ inputs.platform }}-${{ hashFiles('src/**/package.xml') }}
49+
key: apt-get-${{ inputs.platform }}-main-${{ inputs.platform == 'arm64' && 'arm64-' || '' }}${{ hashFiles('src/**/package.xml') }}
5050
restore-keys: |
51+
apt-get-${{ inputs.platform }}-main-${{ inputs.platform == 'arm64' && 'arm64-' || '' }}
5152
apt-get-${{ inputs.platform }}-
5253
5354
- name: Inject cache into docker

.github/actions/docker-build/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ runs:
114114
context: .
115115
push: false
116116
build-args: ${{ inputs.build-args }}
117-
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ inputs.platform }}-${{ inputs.cache-tag-suffix }}
117+
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ inputs.platform }}-main

.github/workflows/health-check.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,14 @@ jobs:
3434
- build-type: main
3535
platform: amd64
3636
runner: ubuntu-22.04
37-
arch-platform: linux/amd64
3837
lib-dir: x86_64
3938
- build-type: nightly
4039
platform: amd64
4140
runner: ubuntu-22.04
42-
arch-platform: linux/amd64
4341
lib-dir: x86_64
4442
- build-type: main-arm64
4543
platform: arm64
4644
runner: ubuntu-22.04-arm
47-
arch-platform: linux/arm64
4845
lib-dir: aarch64
4946
runs-on: ${{ matrix.runner }}
5047
steps:
@@ -91,7 +88,7 @@ jobs:
9188
github.event_name == 'workflow_dispatch' }}
9289
uses: ./.github/actions/docker-build
9390
with:
94-
platform: ${{ matrix.arch-platform }}
91+
platform: ${{ matrix.platform }}
9592
cache-tag-suffix: ${{ matrix.build-type }}
9693
additional-repos: ${{ matrix.build-type == 'nightly' && 'autoware-nightly.repos' || '' }}
9794
build-args: |

0 commit comments

Comments
 (0)