Skip to content

Commit

Permalink
Merge branch 'main' into src-imported
Browse files Browse the repository at this point in the history
  • Loading branch information
youtalk authored May 19, 2024
2 parents be49c85 + 837b486 commit d7effac
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 44 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/build-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ on:
default: tarball

jobs:
load-env:
uses: ./.github/workflows/load-env.yaml

build-main-self-hosted:
needs: load-env
runs-on: [self-hosted, linux, ARM64]
strategy:
fail-fast: false
Expand Down Expand Up @@ -43,25 +47,18 @@ jobs:
- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Load env
run: |
cat amd64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
if [ "$(uname -m)" = "aarch64" ]; then
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-universe'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-openadk
build-args: |
*.platform=linux/arm64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env[format('{0}', matrix.base_image_env)] }}
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.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 }}
tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64
tag-prefix: ${{ env.rosdistro }}
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: false

- name: Show disk space
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ on:
default: tarball

jobs:
load-env:
uses: ./.github/workflows/load-env.yaml

build-main:
needs: load-env
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -38,25 +42,18 @@ jobs:
- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Load env
run: |
cat amd64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
if [ "$(uname -m)" = "aarch64" ]; then
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-universe'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-openadk
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env[format('{0}', matrix.base_image_env)] }}
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.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 }}
tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64
tag-prefix: ${{ env.rosdistro }}
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: false

- name: Show disk space
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/docker-build-and-push-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ on:
default: tarball

jobs:
load-env:
uses: ./.github/workflows/load-env.yaml

docker-build-and-push-main-self-hosted:
needs: load-env
runs-on: [self-hosted, linux, ARM64]
strategy:
fail-fast: false
Expand Down Expand Up @@ -55,25 +59,18 @@ jobs:
- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Load env
run: |
cat amd64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
if [ "$(uname -m)" = "aarch64" ]; then
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-openadk'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-openadk
build-args: |
*.platform=linux/arm64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env[format('{0}', matrix.base_image_env)] }}
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.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 }}
tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64
tag-prefix: ${{ env.rosdistro }}
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true

- name: Show disk space
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/docker-build-and-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ on:
default: tarball

jobs:
load-env:
uses: ./.github/workflows/load-env.yaml

docker-build-and-push-main:
needs: load-env
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -50,25 +54,18 @@ jobs:
- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Load env
run: |
cat amd64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
if [ "$(uname -m)" = "aarch64" ]; then
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-openadk'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-openadk
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env[format('{0}', matrix.base_image_env)] }}
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.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 }}
tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64
tag-prefix: ${{ env.rosdistro }}
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true

- name: Show disk space
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/load-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name: load-env
on:
workflow_call:
outputs:
base-image:
value: ${{ jobs.load-env.outputs.base-image }}
base_image:
value: ${{ jobs.load-env.outputs.base_image }}
rosdistro:
value: ${{ jobs.load-env.outputs.rosdistro }}

jobs:
load-env:
runs-on: ubuntu-latest
outputs:
base-image: ${{ steps.set-env.outputs.base-image }}
base_image: ${{ steps.set-env.outputs.base_image }}
rosdistro: ${{ steps.set-env.outputs.rosdistro }}
steps:
- name: Check out repository
Expand All @@ -28,5 +28,5 @@ jobs:
- name: Set env
id: set-env
run: |
echo "base-image=${{ env.base_image }}" >> $GITHUB_OUTPUT
echo "base_image=${{ env.base_image }}" >> $GITHUB_OUTPUT
echo "rosdistro=${{ env.rosdistro }}" >> $GITHUB_OUTPUT

0 comments on commit d7effac

Please sign in to comment.