Skip to content

Commit

Permalink
Merge branch 'develop' into update-consai_ros2
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo authored Jun 17, 2024
2 parents bad3654 + 778e700 commit 907418a
Show file tree
Hide file tree
Showing 98 changed files with 2,367 additions and 2,044 deletions.
102 changes: 50 additions & 52 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
|| fromJSON('[ "ubuntu-latest" ]')
}}
timeout-minutes: 30
container: ghcr.io/ibis-ssl/crane:prebuilt
container: ghcr.io/ibis-ssl/crane:base
env:
DEBIAN_FRONTEND: noninteractive
strategy:
Expand All @@ -27,75 +27,73 @@ jobs:
run: |
git config --global --add safe.directory '*'
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Copy repository
run: |
mkdir -p ~/ibis_ws/src/crane
cp -rf . ~/ibis_ws/src/crane
shell: bash

- name: Install dependencies
run: |
cd ~/ibis_ws
vcs import src < src/crane/dependency_${{ matrix.rosdistro }}.repos
- name: Resolve rosdep
run: |
cd ~/ibis_ws
apt-get update
rosdep update
rosdep install -iy --from-paths src --rosdistro ${{ matrix.rosdistro }} --dependency-types=build --dependency-types=buildtool --dependency-types=test
shell: bash

- name: Setup Problem Matchers for GCC
run: echo "::add-matcher::${{ github.workspace }}/.github/matchers/gcc.json"
run: echo "::add-matcher::.github/matchers/gcc.json"

- name: Restore build artifacts
uses: actions/cache/restore@v4
with:
path: |
/root/ibis_ws/build
/root/ibis_ws/install
key: build-humble-${{ github.event.pull_request.number }}
- name: Setup Problem Matchers for clang-format
if: steps.get-modified-packages.outputs.modified-packages != ''
run: echo "::add-matcher::.github/matchers/clang-format.json"

- name: Get modified packages
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1

- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
base-branch: develop
token: ${{ secrets.GITHUB_TOKEN }}

- name: Build packages
- name: Clone dependency packages
run: |
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
cd ~/ibis_ws
colcon build --symlink-install --packages-above-and-dependencies ${{ steps.get-modified-packages.outputs.modified-packages }} --cmake-args '-DCMAKE_BUILD_TYPE=Release'
mkdir -p dependency_ws
vcs import dependency_ws < dependency_${{ matrix.rosdistro }}.repos
shell: bash

- name: Save build artifacts
uses: actions/cache/save@v4
with:
path: |
/root/ibis_ws/build
/root/ibis_ws/install
key: build-humble-${{ github.event.pull_request.number }}-${{ github.sha }}

- name: Colcon test
- name: Run rosdep install
run: |
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
cd ~/ibis_ws
colcon test
package_paths=$(colcon list -p --packages-above-and-dependencies ${{ steps.get-modified-packages.outputs.modified-packages }} --base-paths . dependency_ws)
sudo apt-get -yqq update
rosdep update
DEBIAN_FRONTEND=noninteractive rosdep install -yqq --from-paths ${package_paths} --ignore-src --rosdistro ${{ matrix.rosdistro }}
shell: bash

- name: Setup Problem Matchers for clang-format
run: echo "::add-matcher::${{ github.workspace }}/.github/matchers/clang-format.json"
- name: Set up colcon-mixin
run: |
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml || true
colcon mixin update default
shell: bash

- name: Show test result
- name: Build
run: |
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
cd ~/ibis_ws
colcon test-result --verbose
. /opt/ros/${{ matrix.rosdistro }}/setup.sh
colcon build --event-handlers console_cohesion+ \
--packages-above-and-dependencies ${{ steps.get-modified-packages.outputs.modified-packages }} \
--cmake-args -DCMAKE_BUILD_TYPE=Release \
--mixin coverage-gcc coverage-pytest compile-commands
shell: bash

- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
./build
./install
key: build-${{ matrix.rosdistro }}-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}

- name: Test
id: test
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: dependency_${{ matrix.rosdistro }}.repos
6 changes: 5 additions & 1 deletion .github/workflows/custom_dict.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
"ZJUNlict",
"luhbots",
"nAMeC",
"TRAPS",
"Shinobi",
"reRo",
"roboticserlangen",
"tigersmannheim",
"simulatorcli",
Expand All @@ -105,6 +108,7 @@
"MPPI",
"Kwargs",
"voicevox",
"FREEKICK"
"FREEKICK",
"rcst"
]
}
22 changes: 18 additions & 4 deletions .github/workflows/docker_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- develop
workflow_dispatch:

jobs:
build_base:
name: build base image
Expand All @@ -16,6 +15,9 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -25,12 +27,14 @@ jobs:

- name: Build image
if: steps.check_image.outputs.GITHUB_OUTPUT == ${{ steps.extract_dependencies.outputs.rosdep_checksum }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: docker/base/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:base
cache-from: type=gha
cache-to: type=gha,mode=max

build_ccache:
name: build ccache image
Expand All @@ -41,6 +45,9 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -50,12 +57,14 @@ jobs:

- name: Build image
if: steps.check_image.outputs.GITHUB_OUTPUT == ${{ steps.extract_dependencies.outputs.rosdep_checksum }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: docker/ccache/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:ccache
cache-from: type=gha
cache-to: type=gha,mode=max

build_prebuilt:
name: build prebuilt image
Expand All @@ -66,6 +75,9 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -75,9 +87,11 @@ jobs:

- name: Build image
if: steps.check_image.outputs.GITHUB_OUTPUT == ${{ steps.extract_dependencies.outputs.rosdep_checksum }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: docker/prebuilt/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:prebuilt
cache-from: type=gha
cache-to: type=gha,mode=max
Loading

0 comments on commit 907418a

Please sign in to comment.