diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml deleted file mode 100644 index d79e709888..0000000000 --- a/.github/workflows/backport.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: backport -on: - pull_request_target: - types: - - closed - - labeled - -jobs: - backport: - runs-on: ubuntu-latest - # Only react to merged PRs for security reasons. - # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. - if: > - github.event.pull_request.merged - && ( - github.event.action == 'closed' - || ( - github.event.action == 'labeled' - && contains(github.event.label.name, 'backport') - ) - ) - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - uses: tibdex/backport@v2 - with: - github_token: ${{ steps.generate-token.outputs.token }} - title_template: "<%= title %> (backport #<%= number %>)" diff --git a/.github/workflows/build-main-self-hosted.yaml b/.github/workflows/build-main-self-hosted.yaml deleted file mode 100644 index e4cc44884e..0000000000 --- a/.github/workflows/build-main-self-hosted.yaml +++ /dev/null @@ -1,69 +0,0 @@ -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: - build-main-self-hosted: - 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: 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.SETUP_ARGS=${{ matrix.setup-args }} - *.args.LIB_DIR=${{ matrix.lib_dir }} - tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64 - tag-prefix: ${{ env.rosdistro }} - allow-push: false - - - name: Show disk space - run: | - df -h diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml deleted file mode 100644 index 7b21980574..0000000000 --- a/.github/workflows/build-main.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: build-main - -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: - build-main: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - name: - - no-cuda - - cuda - include: - - name: no-cuda - base_image_env: base_image - lib_dir: x86_64 - setup-args: --no-nvidia - additional-tag-suffix: "" - - name: cuda - base_image_env: base_image - lib_dir: x86_64 - additional-tag-suffix: -cuda - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - 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.SETUP_ARGS=${{ matrix.setup-args }} - *.args.LIB_DIR=${{ matrix.lib_dir }} - tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64 - tag-prefix: ${{ env.rosdistro }} - allow-push: false - - - name: Show disk space - run: | - df -h diff --git a/.github/workflows/cancel-previous-workflows.yaml b/.github/workflows/cancel-previous-workflows.yaml deleted file mode 100644 index 44983f7dea..0000000000 --- a/.github/workflows/cancel-previous-workflows.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: cancel-previous-workflows - -on: - pull_request_target: - -jobs: - cancel-previous-workflows: - runs-on: ubuntu-latest - steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - workflow_id: all - all_but_latest: true diff --git a/.github/workflows/docker-build-and-push-main-self-hosted.yaml b/.github/workflows/docker-build-and-push-main-self-hosted.yaml deleted file mode 100644 index 315e5b1ed0..0000000000 --- a/.github/workflows/docker-build-and-push-main-self-hosted.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# EVENTS: push, schedule, workflow_dispatch -# workflow_dispatch: Build all. No publish to registry; save as tarball. -# schedule: Build only devel and prebuilt. TAGS: date, latest -# push-branch: Build only devel and prebuilt. TAGS: date, latest -# push-tag: Build all. TAGS: version, date, latest - -name: docker-build-and-push-main-self-hosted - -on: - push: - tags: - - adkit-v*.*.* - branches: - - main - schedule: - - cron: 0 0 1,15 * * - workflow_dispatch: - inputs: - artifacts-destination: - type: choice - description: Destination for the artifacts - options: - - registry - - tarball - default: tarball - -jobs: - docker-build-and-push-main-self-hosted: - 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: 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.SETUP_ARGS=${{ matrix.setup-args }} - *.args.LIB_DIR=${{ matrix.lib_dir }} - tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64 - tag-prefix: ${{ env.rosdistro }} - allow-push: true - - - name: Show disk space - run: | - df -h diff --git a/.github/workflows/docker-build-and-push-main.yaml b/.github/workflows/docker-build-and-push-main.yaml deleted file mode 100644 index d5fe698bcc..0000000000 --- a/.github/workflows/docker-build-and-push-main.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# EVENTS: push, schedule, workflow_dispatch -# workflow_dispatch: Build all. No publish to registry; save as tarball. -# schedule: Build only devel and prebuilt. TAGS: date, latest -# push-branch: Build only devel and prebuilt. TAGS: date, latest -# push-tag: Build all. TAGS: version, date, latest - -name: docker-build-and-push-main - -on: - push: - tags: - - adkit-v*.*.* - branches: - - main - schedule: - - cron: 0 0 1,15 * * - workflow_dispatch: - inputs: - artifacts-destination: - type: choice - description: Destination for the artifacts - options: - - registry - - tarball - default: tarball - -jobs: - docker-build-and-push-main: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - name: - - no-cuda - - cuda - include: - - name: no-cuda - base_image_env: base_image - lib_dir: x86_64 - setup-args: --no-nvidia - additional-tag-suffix: "" - - name: cuda - base_image_env: base_image - lib_dir: x86_64 - additional-tag-suffix: -cuda - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - 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.SETUP_ARGS=${{ matrix.setup-args }} - *.args.LIB_DIR=${{ matrix.lib_dir }} - tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64 - tag-prefix: ${{ env.rosdistro }} - allow-push: true - - - name: Show disk space - run: | - df -h diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 0000000000..622f2dc07e --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,56 @@ +name: docker-build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Free disk space + uses: ./.github/actions/free-disk-space + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + driver-opts: image=moby/buildkit:latest + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/youtalk/autoware + + - name: Build and push with Buildx Bake + uses: docker/bake-action@v4 + with: + context: . + push: true + files: | + docker/autoware-openadk/docker-bake.hcl + targets: | + default + set: | + *.platform=linux/amd64 + *.args.ROS_DISTRO=humble + *.args.BASE_IMAGE=ros:humble-ros-base-jammy + *.args.LIB_DIR=x86_64 + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml deleted file mode 100644 index b426d0cba6..0000000000 --- a/.github/workflows/github-release.yaml +++ /dev/null @@ -1,78 +0,0 @@ -name: github-release - -on: - push: - branches: - - beta/v* - tags: - - v* - workflow_dispatch: - inputs: - beta-branch-or-tag-name: - description: The name of the beta branch or tag to release - type: string - required: true - -jobs: - github-release: - runs-on: ubuntu-latest - steps: - - name: Set tag name - id: set-tag-name - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - REF_NAME="${{ github.event.inputs.beta-branch-or-tag-name }}" - else - REF_NAME="${{ github.ref_name }}" - fi - - echo "ref-name=$REF_NAME" >> $GITHUB_OUTPUT - echo "tag-name=${REF_NAME#beta/}" >> $GITHUB_OUTPUT - - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ steps.set-tag-name.outputs.ref-name }} - - - name: Set target name for beta branches - id: set-target-name - run: | - if [[ "${{ steps.set-tag-name.outputs.ref-name }}" =~ "beta/" ]]; then - echo "target-name=${{ steps.set-tag-name.outputs.ref-name }}" >> $GITHUB_OUTPUT - fi - - - name: Create a local tag for beta branches - run: | - if [ "${{ steps.set-target-name.outputs.target-name }}" != "" ]; then - git tag "${{ steps.set-tag-name.outputs.tag-name }}" - fi - - - name: Run generate-changelog - id: generate-changelog - uses: autowarefoundation/autoware-github-actions/generate-changelog@v1 - - - name: Select verb - id: select-verb - run: | - has_previous_draft=$(gh release view --json isDraft -q ".isDraft" "${{ steps.set-tag-name.outputs.tag-name }}") || true - - verb=create - if [ "$has_previous_draft" = "true" ]; then - verb=edit - fi - - echo "verb=$verb" >> $GITHUB_OUTPUT - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Release to GitHub - run: | - gh release ${{ steps.select-verb.outputs.verb }} "${{ steps.set-tag-name.outputs.tag-name }}" \ - --draft \ - --target "${{ steps.set-target-name.outputs.target-name }}" \ - --title "Release ${{ steps.set-tag-name.outputs.tag-name }}" \ - --notes "$NOTES" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NOTES: ${{ steps.generate-changelog.outputs.changelog }} diff --git a/.github/workflows/load-env.yaml b/.github/workflows/load-env.yaml deleted file mode 100644 index 508a30bf74..0000000000 --- a/.github/workflows/load-env.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: load-env - -on: - workflow_call: - outputs: - 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 }} - rosdistro: ${{ steps.set-env.outputs.rosdistro }} - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - 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: Set env - id: set-env - run: | - echo "base-image=${{ env.base_image }}" >> $GITHUB_OUTPUT - echo "rosdistro=${{ env.rosdistro }}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/mirror-main-branch.yaml b/.github/workflows/mirror-main-branch.yaml deleted file mode 100644 index 504867e36e..0000000000 --- a/.github/workflows/mirror-main-branch.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: mirror-main-branch - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - mirror-main-branch: - runs-on: ubuntu-latest - steps: - - uses: zofrex/mirror-branch@v1 - with: - target-branch: humble diff --git a/.github/workflows/pre-commit-ansible-autoupdate.yaml b/.github/workflows/pre-commit-ansible-autoupdate.yaml deleted file mode 100644 index 84bc42eada..0000000000 --- a/.github/workflows/pre-commit-ansible-autoupdate.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: pre-commit-ansible-autoupdate - -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: - -jobs: - check-secret: - uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1 - secrets: - secret: ${{ secrets.APP_ID }} - - pre-commit-ansible-autoupdate: - needs: check-secret - if: ${{ needs.check-secret.outputs.set == 'true' }} - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - name: Run pre-commit-autoupdate - uses: autowarefoundation/autoware-github-actions/pre-commit-autoupdate@v1 - with: - token: ${{ steps.generate-token.outputs.token }} - pre-commit-config: .pre-commit-config-ansible.yaml - pr-labels: | - tag:bot - tag:pre-commit-autoupdate - pr-branch: pre-commit-ansible-autoupdate - pr-title: "ci(pre-commit-ansible): autoupdate" - pr-commit-message: "ci(pre-commit-ansible): autoupdate" - auto-merge-method: squash diff --git a/.github/workflows/pre-commit-ansible.yaml b/.github/workflows/pre-commit-ansible.yaml deleted file mode 100644 index dd023cbd26..0000000000 --- a/.github/workflows/pre-commit-ansible.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: pre-commit-ansible - -on: - pull_request: - -jobs: - pre-commit-ansible: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Set git config - uses: autowarefoundation/autoware-github-actions/set-git-config@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Ansible Galaxy depends for ansible-lint - run: | - ansible-galaxy collection install -f -r ansible-galaxy-requirements.yaml - - - name: Run pre-commit - uses: autowarefoundation/autoware-github-actions/pre-commit@v1 - with: - pre-commit-config: .pre-commit-config-ansible.yaml diff --git a/.github/workflows/pre-commit-autoupdate.yaml b/.github/workflows/pre-commit-autoupdate.yaml deleted file mode 100644 index 23b403f2a5..0000000000 --- a/.github/workflows/pre-commit-autoupdate.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: pre-commit-autoupdate - -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: - -jobs: - check-secret: - uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1 - secrets: - secret: ${{ secrets.APP_ID }} - - pre-commit-autoupdate: - needs: check-secret - if: ${{ needs.check-secret.outputs.set == 'true' }} - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - name: Run pre-commit-autoupdate - uses: autowarefoundation/autoware-github-actions/pre-commit-autoupdate@v1 - with: - token: ${{ steps.generate-token.outputs.token }} - pre-commit-config: .pre-commit-config.yaml - pr-labels: | - tag:bot - tag:pre-commit-autoupdate - pr-branch: pre-commit-autoupdate - pr-title: "ci(pre-commit): autoupdate" - pr-commit-message: "ci(pre-commit): autoupdate" - auto-merge-method: squash diff --git a/.github/workflows/pre-commit-optional-autoupdate.yaml b/.github/workflows/pre-commit-optional-autoupdate.yaml deleted file mode 100644 index 72718377c7..0000000000 --- a/.github/workflows/pre-commit-optional-autoupdate.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: pre-commit-optional-autoupdate - -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: - -jobs: - check-secret: - uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1 - secrets: - secret: ${{ secrets.APP_ID }} - - pre-commit-optional-autoupdate: - needs: check-secret - if: ${{ needs.check-secret.outputs.set == 'true' }} - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - name: Run pre-commit-autoupdate - uses: autowarefoundation/autoware-github-actions/pre-commit-autoupdate@v1 - with: - token: ${{ steps.generate-token.outputs.token }} - pre-commit-config: .pre-commit-config-optional.yaml - pr-labels: | - tag:bot - tag:pre-commit-autoupdate - pr-branch: pre-commit-optional-autoupdate - pr-title: "ci(pre-commit-optional): autoupdate" - pr-commit-message: "ci(pre-commit-optional): autoupdate" - auto-merge-method: squash diff --git a/.github/workflows/pre-commit-optional.yaml b/.github/workflows/pre-commit-optional.yaml deleted file mode 100644 index 38738196a0..0000000000 --- a/.github/workflows/pre-commit-optional.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: pre-commit-optional - -on: - pull_request: - -jobs: - pre-commit-optional: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Run pre-commit - uses: autowarefoundation/autoware-github-actions/pre-commit@v1 - with: - pre-commit-config: .pre-commit-config-optional.yaml - base-branch: origin/${{ github.base_ref }} diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml deleted file mode 100644 index c724885fcb..0000000000 --- a/.github/workflows/pre-commit.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: pre-commit - -on: - pull_request: - -jobs: - pre-commit: - if: ${{ github.event.repository.private }} # Use pre-commit.ci for public repositories - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - name: Check out repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.ref }} - - - name: Run pre-commit - uses: autowarefoundation/autoware-github-actions/pre-commit@v1 - with: - pre-commit-config: .pre-commit-config.yaml - token: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/semantic-pull-request.yaml b/.github/workflows/semantic-pull-request.yaml deleted file mode 100644 index 71224c224e..0000000000 --- a/.github/workflows/semantic-pull-request.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: semantic-pull-request - -on: - pull_request_target: - types: - - opened - - edited - - synchronize - -jobs: - semantic-pull-request: - uses: autowarefoundation/autoware-github-actions/.github/workflows/semantic-pull-request.yaml@v1 diff --git a/.github/workflows/setup-docker.yaml b/.github/workflows/setup-docker.yaml deleted file mode 100644 index caca7bcc9c..0000000000 --- a/.github/workflows/setup-docker.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: setup-docker - -on: - pull_request: - -jobs: - setup-docker: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Run setup script - run: | - ./setup-dev-env.sh -y -v docker diff --git a/.github/workflows/setup-universe.yaml b/.github/workflows/setup-universe.yaml deleted file mode 100644 index ef39011aca..0000000000 --- a/.github/workflows/setup-universe.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: setup-universe - -on: - pull_request: - -jobs: - setup-universe: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Set git config - uses: autowarefoundation/autoware-github-actions/set-git-config@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Run setup script - run: | - ./setup-dev-env.sh -y -v universe diff --git a/.github/workflows/spell-check-differential.yaml b/.github/workflows/spell-check-differential.yaml deleted file mode 100644 index 1fbf2ff469..0000000000 --- a/.github/workflows/spell-check-differential.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: spell-check-differential - -on: - pull_request: - -jobs: - spell-check-differential: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Run spell-check - uses: autowarefoundation/autoware-github-actions/spell-check@v1 - with: - cspell-json-url: https://raw.githubusercontent.com/tier4/autoware-spell-check-dict/main/.cspell.json diff --git a/.github/workflows/sync-files.yaml b/.github/workflows/sync-files.yaml deleted file mode 100644 index 51e523b803..0000000000 --- a/.github/workflows/sync-files.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: sync-files - -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: - -jobs: - check-secret: - uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1 - secrets: - secret: ${{ secrets.APP_ID }} - - sync-files: - needs: check-secret - if: ${{ needs.check-secret.outputs.set == 'true' }} - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - name: Run sync-files - uses: autowarefoundation/autoware-github-actions/sync-files@v1 - with: - token: ${{ steps.generate-token.outputs.token }} - pr-labels: | - tag:bot - tag:sync-files - auto-merge-method: squash diff --git a/.github/workflows/update-docker-manifest.yaml b/.github/workflows/update-docker-manifest.yaml deleted file mode 100644 index 7c63a54dcb..0000000000 --- a/.github/workflows/update-docker-manifest.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: update-docker-manifest - -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: - -jobs: - update-docker-manifest: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Combine multi arch images for 'autoware-openadk' - uses: ./.github/actions/combine-multi-arch-images - with: - package-name: autoware-openadk diff --git a/.github/workflows/update-tool-versions.yaml b/.github/workflows/update-tool-versions.yaml deleted file mode 100644 index 9ec312d7ca..0000000000 --- a/.github/workflows/update-tool-versions.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: update-tool-versions - -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: - -jobs: - update-tool-versions: - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - name: Check out repository - uses: actions/checkout@v4 - - - name: Set up sd - uses: kenji-miyake/setup-sd@v2 - - - name: Get clang-format version - id: get-clang-format-version - run: | - function get-latest-pip-version() { - pip index versions "$1" 2>/dev/null | head -n1 | sd '.*\((.*)\)' '$1' - } - - echo "version=$(get-latest-pip-version clang-format)" >> $GITHUB_OUTPUT - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Update clang-format version - run: | - sd '(pre_commit_clang_format_version): .*' '$1: ${{ steps.get-clang-format-version.outputs.version }}' ansible/roles/pre_commit/defaults/main.yaml - sd '(pre_commit_clang_format_version)=.*' '$1=${{ steps.get-clang-format-version.outputs.version }}' ansible/roles/pre_commit/README.md - - - name: Create PR - id: create-pr - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ steps.generate-token.outputs.token }} - base: ${{ github.event.repository.default_branch }} - branch: update-tool-versions - title: "chore: update tool versions" - commit-message: "chore: update tool versions" - body: "" - labels: | - tag:bot - tag:update-tool-versions - signoff: true - delete-branch: true - - - name: Check outputs - run: | - echo "Pull Request Number - ${{ steps.create-pr.outputs.pull-request-number }}" - echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}" - shell: bash - - - name: Enable auto-merge - if: ${{ steps.create-pr.outputs.pull-request-operation == 'created' }} - run: gh pr merge --squash --auto "${{ steps.create-pr.outputs.pull-request-number }}" - env: - GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/vcs-import.yaml b/.github/workflows/vcs-import.yaml deleted file mode 100644 index 235c2b19df..0000000000 --- a/.github/workflows/vcs-import.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: vcs-import - -on: - pull_request: - workflow_dispatch: - -jobs: - load-env: - uses: ./.github/workflows/load-env.yaml - - vcs-import: - needs: load-env - runs-on: ubuntu-latest - container: ros:${{ needs.load-env.outputs.rosdistro }} - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Install pip for rosdep - run: | - sudo apt-get -y update - sudo apt-get -y install python3-pip - - - name: Register AutonomouStuff repository - uses: autowarefoundation/autoware-github-actions/register-autonomoustuff-repository@v1 - with: - rosdistro: ${{ needs.load-env.outputs.rosdistro }} - - - name: Set git config - uses: autowarefoundation/autoware-github-actions/set-git-config@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Run vcs import - run: | - mkdir src - vcs import src < autoware.repos - - - name: Run vcs export - run: | - vcs export --exact src || true - - - name: Run rosdep install - run: | - sudo apt-get -y update - rosdep update - DEBIAN_FRONTEND=noninteractive rosdep install -y --from-paths src --ignore-src --rosdistro ${{ needs.load-env.outputs.rosdistro }} diff --git a/docker/autoware-openadk/Dockerfile b/docker/autoware-openadk/Dockerfile index c7ce5cca80..3602fe690c 100644 --- a/docker/autoware-openadk/Dockerfile +++ b/docker/autoware-openadk/Dockerfile @@ -66,7 +66,10 @@ RUN --mount=type=ssh \ && apt-get update \ && rosdep update \ && DEBIAN_FRONTEND=noninteractive rosdep install -y --ignore-src --from-paths src --rosdistro "$ROS_DISTRO" \ - && source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache + +# Build Autoware +RUN source /opt/ros/"$ROS_DISTRO"/setup.bash \ && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --cmake-args \ " -Wno-dev" \ " --no-warn-unused-cli" \ @@ -74,7 +77,6 @@ RUN --mount=type=ssh \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ && find /autoware/install -type d -exec chmod 777 {} \; \ && chmod -R 777 /var/tmp/ccache \ - && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache \ && rm -rf /autoware/build /autoware/src CMD ["/bin/bash"] diff --git a/docker/autoware-openadk/docker-bake.hcl b/docker/autoware-openadk/docker-bake.hcl index d472a0df00..ee292aa3bc 100644 --- a/docker/autoware-openadk/docker-bake.hcl +++ b/docker/autoware-openadk/docker-bake.hcl @@ -2,25 +2,26 @@ group "default" { targets = ["prebuilt", "devel", "runtime"] } -// For docker/metadata-action -target "docker-metadata-action-prebuilt" {} -target "docker-metadata-action-devel" {} -target "docker-metadata-action-runtime" {} - target "prebuilt" { - inherits = ["docker-metadata-action-prebuilt"] dockerfile = "docker/autoware-openadk/Dockerfile" target = "prebuilt" + tags = ["ghcr.io/youtalk/autoware/prebuilt:latest"] + cache-from = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache"] + cache-to = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache,mode=max"] } target "devel" { - inherits = ["docker-metadata-action-devel"] dockerfile = "docker/autoware-openadk/Dockerfile" target = "devel" + tags = ["ghcr.io/youtalk/autoware/devel:latest"] + cache-from = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache"] + cache-to = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache,mode=max"] } target "runtime" { - inherits = ["docker-metadata-action-runtime"] dockerfile = "docker/autoware-openadk/Dockerfile" target = "runtime" + tags = ["ghcr.io/youtalk/autoware/runtime:latest"] + cache-from = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache"] + cache-to = ["type=registry,ref=ghcr.io/youtalk/autoware:buildcache,mode=max"] }