Skip to content

Commit

Permalink
feat(ci): enable Docker build cache to 5 times faster container build (
Browse files Browse the repository at this point in the history
…autowarefoundation#4730)

* introduce src-imported stage

Signed-off-by: Yutaka Kondo <[email protected]>

* empty

Signed-off-by: Yutaka Kondo <[email protected]>

* generate install package lists

* append || true

Signed-off-by: Yutaka Kondo <[email protected]>

* cat packages

Signed-off-by: Yutaka Kondo <[email protected]>

* chore(docker): separate `rosdep install` and `colcon build` RUN commands (autowarefoundation#4719)

* wip

Signed-off-by: Yutaka Kondo <[email protected]>

* wip

Signed-off-by: Yutaka Kondo <[email protected]>

* Update Dockerfile

* Update Dockerfile

* install pacmod

* rename

* Revert "install pacmod"

This reverts commit ebff10f.

* install pacmod3

* register pamod3 repos

* ignore hadolint

* revert

* run set-dev-env.sh

* pip install

* copy

* rosdep update

* vcs import outside dockerfile

Signed-off-by: Yutaka Kondo <[email protected]>

* enable docker build cache

Signed-off-by: Yutaka Kondo <[email protected]>

* empty

Signed-off-by: Yutaka Kondo <[email protected]>

* add no-cuda/cuda suffix

Signed-off-by: Yutaka Kondo <[email protected]>

* remove --download-artifacts

Signed-off-by: Yutaka Kondo <[email protected]>

* remove --download-artifacts

Signed-off-by: Yutaka Kondo <[email protected]>

* add --data-path option

Signed-off-by: Yutaka Kondo <[email protected]>

* wip

Signed-off-by: Yutaka Kondo <[email protected]>

* run download_artifacts

Signed-off-by: Yutaka Kondo <[email protected]>

* remove todo

Signed-off-by: Yutaka Kondo <[email protected]>

* revert run

Signed-off-by: Yutaka Kondo <[email protected]>

---------

Signed-off-by: Yutaka Kondo <[email protected]>
  • Loading branch information
youtalk authored May 25, 2024
1 parent e8a258f commit ab8bbf5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
*.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
*.args.LIB_DIR=${{ matrix.lib_dir }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: false
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
*.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
*.args.LIB_DIR=${{ matrix.lib_dir }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: false
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker-build-and-push-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ jobs:
*.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
*.args.LIB_DIR=${{ matrix.lib_dir }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker-build-and-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
*.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
*.args.LIB_DIR=${{ matrix.lib_dir }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true
Expand Down

0 comments on commit ab8bbf5

Please sign in to comment.