build-main-self-hosted #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-main-self-hosted | |
on: | |
schedule: | |
- cron: 0 12 * * * | |
workflow_dispatch: | |
inputs: | |
artifacts-destination: | |
type: choice | |
description: Built images will be saved as tarball | |
options: | |
- tarball | |
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 | |
matrix: | |
name: | |
- no-cuda | |
- cuda | |
include: | |
- name: no-cuda | |
base_image_env: base_image | |
lib_dir: aarch64 | |
setup-args: --no-nvidia | |
additional-tag-suffix: "" | |
- name: cuda | |
base_image_env: base_image | |
lib_dir: aarch64 | |
additional-tag-suffix: -cuda | |
steps: | |
# https://github.com/actions/checkout/issues/211 | |
- name: Change permission of workspace | |
run: | | |
sudo chown -R $USER:$USER ${{ github.workspace }} | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install vcstool | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install python3-pip | |
pip install --no-cache-dir vcstool | |
- name: Set git config | |
uses: autowarefoundation/autoware-github-actions/set-git-config@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Free disk space | |
uses: ./.github/actions/free-disk-space | |
- name: Run vcs import | |
run: | | |
mkdir src | |
vcs import src < autoware.repos | |
- name: Build 'autoware-universe' | |
uses: ./.github/actions/docker-build-and-push | |
with: | |
bake-target: autoware | |
build-args: | | |
*.platform=linux/arm64 | |
*.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 }} | |
*.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 | |
- name: Show disk space | |
run: | | |
df -h |