diff --git a/.github/actions/docker-build/action.yaml b/.github/actions/docker-build/action.yaml index 9a6a6e7e14..df338a836d 100644 --- a/.github/actions/docker-build/action.yaml +++ b/.github/actions/docker-build/action.yaml @@ -8,6 +8,10 @@ inputs: cache-tag-suffix: description: Suffix of the target cache tag. required: true + additional-repos: + description: Additional target .repos file. + default: "" + required: false build-args: description: Additional build args. required: false @@ -31,9 +35,15 @@ runs: vcs import src < autoware.repos shell: bash + - name: Import additional repositories + if: ${{ inputs.additional-repos != '' }} + run: | + vcs import src < ${{ inputs.additional-repos }} + shell: bash + - name: Cache ccache uses: actions/cache@v4 - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' && inputs.additional-repos == '' }} id: cache-ccache with: path: | @@ -44,7 +54,7 @@ runs: - name: Cache apt-get uses: actions/cache@v4 - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' && inputs.additional-repos == '' }} id: cache-apt-get with: path: | @@ -55,7 +65,7 @@ runs: - name: Restore ccache uses: actions/cache/restore@v4 - if: ${{ github.ref != 'refs/heads/main' }} + if: ${{ github.ref != 'refs/heads/main' || inputs.additional-repos != '' }} with: path: | root-ccache @@ -65,7 +75,7 @@ runs: - name: Restore apt-get uses: actions/cache/restore@v4 - if: ${{ github.ref != 'refs/heads/main' }} + if: ${{ github.ref != 'refs/heads/main' || inputs.additional-repos != '' }} with: path: | var-cache-apt diff --git a/.github/workflows/health-check-nightly.yaml b/.github/workflows/health-check-nightly.yaml new file mode 100644 index 0000000000..f38836e5d1 --- /dev/null +++ b/.github/workflows/health-check-nightly.yaml @@ -0,0 +1,58 @@ +name: health-check-nightly + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - labeled + schedule: + - cron: 0 6 * * * + workflow_dispatch: + +jobs: + label-check: + uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1 + with: + label: tag:run-health-check + + load-env: + needs: label-check + if: ${{ needs.label-check.outputs.result == 'true' || + github.event_name == 'schedule' || + github.event_name == 'workflow_dispatch' }} + uses: ./.github/workflows/load-env.yaml + + docker-build-nightly: + needs: load-env + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + 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: Free disk space + uses: ./.github/actions/free-disk-space + + - name: Build 'Autoware' + uses: ./.github/actions/docker-build + with: + platform: amd64 + cache-tag-suffix: nightly + additional-repos: autoware-nightly.repos + build-args: | + ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} + BASE_IMAGE=${{ needs.load-env.outputs.base_image }} + LIB_DIR=x86_64 + + - name: Show disk space + if: always() + run: | + df -h diff --git a/autoware-nightly.repos b/autoware-nightly.repos new file mode 100644 index 0000000000..0b58999fd4 --- /dev/null +++ b/autoware-nightly.repos @@ -0,0 +1,37 @@ +repositories: + core/autoware.core: + type: git + url: https://github.com/autowarefoundation/autoware.core.git + version: main + universe/autoware.universe: + type: git + url: https://github.com/autowarefoundation/autoware.universe.git + version: main + launcher/autoware_launch: + type: git + url: https://github.com/autowarefoundation/autoware_launch.git + version: main + sensor_kit/sample_sensor_kit_launch: + type: git + url: https://github.com/autowarefoundation/sample_sensor_kit_launch.git + version: main + sensor_kit/external/awsim_sensor_kit_launch: # TODO: Integrate into sample_sensor_kit_launch + type: git + url: https://github.com/tier4/awsim_sensor_kit_launch.git + version: main + sensor_kit/awsim_labs_sensor_kit_launch: + type: git + url: https://github.com/autowarefoundation/awsim_labs_sensor_kit_launch.git + version: main + sensor_kit/single_lidar_sensor_kit_launch: + type: git + url: https://github.com/autowarefoundation/single_lidar_sensor_kit_launch.git + version: main + vehicle/sample_vehicle_launch: + type: git + url: https://github.com/autowarefoundation/sample_vehicle_launch.git + version: main + vehicle/awsim_labs_vehicle_launch: + type: git + url: https://github.com/autowarefoundation/awsim_labs_vehicle_launch.git + version: main