-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feature_OBCStateM
- Loading branch information
Showing
370 changed files
with
14,993 additions
and
89,654 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,5 @@ | |
build | ||
docs | ||
install | ||
scripts | ||
plugins | ||
gui/controlpanel/node_modules | ||
gui/controlpanel/package-lock.json | ||
Dockerfile |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
name: Bug report | ||
about: File a bug report | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Branch or release information (please complete the following information):** | ||
- Branch/release name: [eg. main, dev or version 1.0.0] | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. ubuntu, arch] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,39 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "dev*" ] | ||
on: workflow_call | ||
|
||
jobs: | ||
build_dockerImage: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: ros:humble | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- run: git config --system --add safe.directory "$PWD" | ||
|
||
- name: Restore build cache | ||
id: cache-build | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
/github/home/atos_ws/build | ||
/github/home/atos_ws/install | ||
key: ${{ runner.os }}-build | ||
|
||
- name: Install ATOS | ||
run: | | ||
./setup_atos.sh | ||
shell: bash | ||
|
||
- name: Print build folder | ||
run: | | ||
ls -R /github/home/atos_ws/build | ||
shell: bash | ||
|
||
- name: Build Docker image | ||
uses: docker/build-push-action@v4 | ||
- name: Upload build folder | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
name: build-folder | ||
path: /github/home/atos_ws/build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "dev*", "master" ] | ||
pull_request: | ||
branches: [ "dev" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
TEST_TAG: astazero/atos_docker_env:test | ||
|
||
jobs: | ||
build_and_test_docker_image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
load: true | ||
tags: ${{ env.TEST_TAG }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Run colcon test on docker image | ||
run: | | ||
docker run --rm ${{ env.TEST_TAG }} bash -c "colcon test --return-code-on-test-failure --event-handlers console_cohesion+" | ||
- name: Run scenario integration test | ||
run: | | ||
docker compose -f docker-compose-test.yml up --abort-on-container-exit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: clang-tidy-review | ||
|
||
# You can be more specific, but it currently only works on pull requests | ||
on: | ||
workflow_call: | ||
inputs: | ||
target_files: | ||
description: 'The list of files to be checked by clang-tidy' | ||
required: true | ||
default: '' | ||
type: string | ||
|
||
jobs: | ||
clang-format: | ||
runs-on: ubuntu-latest | ||
container: ros:humble | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install clang-format | ||
run: | | ||
sudo apt-get -yqq update | ||
sudo apt-get -yqq install clang-format | ||
shell: bash | ||
|
||
- name: Run clang-format style check. | ||
id: clang-format | ||
env: | ||
ALL_CHANGED_FILES: ${{ inputs.target_files }} | ||
run: | | ||
mkdir /tmp/clang-format-result | ||
for file_path in ${ALL_CHANGED_FILES}; do | ||
folder_name="${file_path%/*}/" | ||
mkdir -p /tmp/clang-format-result/$folder_name | ||
clang-format ${file_path} > /tmp/clang-format-result/${file_path} || true | ||
done | ||
- name: Upload clang-format result | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: clang-format-result | ||
path: /tmp/clang-format-result/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: clang-tidy-review | ||
|
||
# You can be more specific, but it currently only works on pull requests | ||
on: | ||
workflow_call: | ||
inputs: | ||
target_files: | ||
description: 'The list of files to be checked by clang-tidy' | ||
required: true | ||
default: '' | ||
type: string | ||
|
||
jobs: | ||
clang-tidy: | ||
runs-on: ubuntu-latest | ||
container: ros:humble | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Prepare atos workspace | ||
run: | | ||
mkdir -p $HOME/atos_ws/src | ||
ln -s $GITHUB_WORKSPACE $HOME/atos_ws/src/atos | ||
- name: Download build folder | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build-folder | ||
path: /github/home/atos_ws/build | ||
|
||
- name: Install Clang-Tidy | ||
run: | | ||
sudo apt-get -yqq update | ||
sudo apt-get -yqq install clang-tidy libomp-dev | ||
shell: bash | ||
|
||
- name: Run clang-tidy linter | ||
if: ${{ inputs.target_files != '' }} | ||
env: | ||
ALL_CHANGED_FILES: ${{ inputs.target_files }} | ||
run: | | ||
echo "running clang-tidy on $ALL_CHANGED_FILES" | ||
ls $HOME/atos_ws/build/ | ||
mkdir /tmp/clang-tidy-result | ||
clang-tidy -p $HOME/atos_ws/build/ -export-fixes /tmp/clang-tidy-result/fixes.yaml --checks=cppcoreguidelines-*,clang-analyzer-* ${ALL_CHANGED_FILES} || true | ||
echo "${{ github.event.number }}" > /tmp/clang-tidy-result/pr-id.txt | ||
echo "${{ github.event.pull_request.head.repo.full_name }}" > /tmp/clang-tidy-result/pr-head-repo.txt | ||
echo "${{ github.event.pull_request.head.ref }}" > /tmp/clang-tidy-result/pr-head-ref.txt | ||
shell: bash | ||
|
||
- name: Check if the fixes.yaml file exists | ||
id: check-fixes-yaml-existence | ||
uses: autowarefoundation/autoware-github-actions/check-file-existence@v1 | ||
with: | ||
files: /tmp/clang-tidy-result/fixes.yaml | ||
|
||
- name: Upload clang-tidy result | ||
if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: clang-tidy-result | ||
path: /tmp/clang-tidy-result/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Clang | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yaml | ||
|
||
file-changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
all: ${{ steps.changed-files.outputs.all }} | ||
cpp: ${{ steps.cpp-files.outputs.CPP }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: jitterbit/get-changed-files@v1 | ||
|
||
- name: Filter on only cpp, hpp, c, and h files | ||
id: cpp-files | ||
run: | | ||
input_files=(${{ steps.changed-files.outputs.all }}) | ||
echo "Input files: $input_files" | ||
cpp_files="" | ||
for f in "${input_files[@]}"; do | ||
if [[ $f == *.cpp || $f == *.hpp || $f == *.c || $f == *.h ]]; then | ||
echo "File ending correct: $f" | ||
cpp_files+="$f " | ||
else | ||
echo "File ending incorrect: $f" | ||
fi | ||
done | ||
echo "Target files: $cpp_files" | ||
{ | ||
echo 'CPP<<EOF' | ||
echo "$cpp_files" | ||
echo EOF | ||
} >> $GITHUB_OUTPUT | ||
- name: Print all files | ||
run: | | ||
echo ${{ steps.cpp-files.outputs.CPP }} | ||
clang-tidy: | ||
uses: ./.github/workflows/clang-tidy.yaml | ||
needs: [build, file-changes] | ||
with: | ||
target_files: ${{ needs.file-changes.outputs.cpp }} | ||
|
||
clang-format: | ||
uses: ./.github/workflows/clang-format.yaml | ||
needs: [file-changes] | ||
with: | ||
target_files: ${{ needs.file-changes.outputs.cpp }} | ||
|
||
cppcheck: | ||
uses: ./.github/workflows/cppcheck.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: cppcheck | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
cppcheck: | ||
runs-on: ubuntu-latest | ||
container: ros:humble | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install cppcheck | ||
run: | | ||
sudo apt-get -yqq update | ||
sudo apt-get -yqq install cppcheck | ||
shell: bash | ||
|
||
- name: Run cppcheck. | ||
id: cppcheck | ||
run: | | ||
mkdir /tmp/cppcheck-result | ||
cppcheck --output-file=/tmp/cppcheck-result/cppcheck-result.txt . | ||
- name: Check if the cppcheck-result.txt file is empty | ||
id: check-cppcheck-result-empty | ||
run: | | ||
if [ -s /tmp/cppcheck-result/cppcheck-result.txt ]; then | ||
echo "empty=false" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "empty=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
shell: bash | ||
|
||
- name: Upload cppcheck result | ||
if: ${{ steps.check-cppcheck-result-empty.outputs.empty == 'false' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cppcheck-result | ||
path: /tmp/cppcheck-result/ | ||
|
||
- name: Mark the workflow as failed if the cppcheck-results.txt file contains errors | ||
if: ${{ steps.check-cppcheck-result-empty.outputs.empty == 'false' }} | ||
run: | | ||
exit 1 | ||
shell: bash |
Oops, something went wrong.