Skip to content

Commit

Permalink
Merge branch 'RJD-1057-remove-traffic-lights-from-entity-manager' int…
Browse files Browse the repository at this point in the history
…o RJD-1057-traffic-lights-tests

Signed-off-by: Mateusz Palczuk <[email protected]>
  • Loading branch information
TauTheLepton committed Oct 2, 2024
2 parents 0dbf4ec + 0656f86 commit bdfb24c
Show file tree
Hide file tree
Showing 231 changed files with 31,988 additions and 2,564 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/BuildAndRun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,28 @@ jobs:
run: |
vcs import src < src/scenario_simulator_v2/dependency_${{ matrix.rosdistro }}.repos
- name: Resolve rosdep
- name: Resolve rosdep and install colcon mixin
run: |
apt-get update
apt-get install -y python3-pip
apt-get install -y python3-pip python3-colcon-lcov-result lcov
rosdep update --include-eol-distros
rosdep install -iy --from-paths src --rosdistro ${{ matrix.rosdistro }}
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
colcon mixin update default
shell: bash

- name: Build packages
run: |
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_CPP_MOCK_SCENARIOS=ON --packages-up-to ${{ steps.list_packages.outputs.package_list }}
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_CPP_MOCK_SCENARIOS=ON -DBUILD_TESTING=true -DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' -DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage' --packages-up-to ${{ steps.list_packages.outputs.package_list }}
shell: bash

- name: Colcon test
run: |
source /opt/ros/${{ matrix.rosdistro }}/setup.bash
source install/local_setup.bash
colcon test --packages-select ${{ steps.list_packages.outputs.package_list }}
colcon test --event-handlers console_cohesion+ --packages-select ${{ steps.list_packages.outputs.package_list }}
colcon lcov-result --packages-select ${{ steps.list_packages.outputs.package_list }}
shell: bash

- name: Show test result
Expand All @@ -97,6 +100,13 @@ jobs:
./src/scenario_simulator_v2/.github/workflows/workflow.sh ./src/scenario_simulator_v2/test_runner/scenario_test_runner/config/workflow.txt global_frame_rate:=20
shell: bash

- name: Upload Lcov result
uses: actions/upload-artifact@v4
with:
name: lcov
path: lcov
retention-days: 1

# - name: Basic test
# run: |
# source install/setup.bash
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/Docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Docker
on:
pull_request:
paths:
- "**"
- "!docs/**"
- "!README.md"
- "!CONTRIBUTING.md"
- "!.github/**"
- ".github/workflows/Docker.yaml"
- "!mkdocs.yml"
- "!pyproject.toml"
- "!poetry.lock"
workflow_dispatch:
inputs:
version:
description: version of the scenario_simulator_v2
required: true

jobs:
push_docker:
name: Push Docker Image
runs-on: ubuntu-22.04
timeout-minutes: 720
strategy:
matrix:
rosdistro: [humble]
arch: [amd64]
# Build test for arm64 CPU is broken.
# This is a temporary solution and will be repaired in the future.
# See also https://github.com/tier4/scenario_simulator_v2/pull/1295
# arch: [amd64, arm64]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false

- name: Install docker for ubuntu runner
uses: docker/setup-buildx-action@v3

- name: Install QEMU
uses: docker/setup-qemu-action@v3

- uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build (${{ matrix.arch }})
if: github.event_name == 'pull_request'
uses: docker/bake-action@v3
with:
files: |
./docker-bake.hcl
workdir: .
set: |
*.cache-to=type=gha,mode=max
*.cache-from=type=gha
push: false
targets: |
${{ matrix.rosdistro }}_base_${{ matrix.arch }}
- name: Build and push (${{ matrix.arch }})
if: github.event_name == 'workflow_dispatch'
uses: docker/bake-action@v3
with:
files: |
./docker-bake.hcl
workdir: .
set: |
*.cache-to=type=gha,mode=max
*.cache-from=type=gha
*.tags=ghcr.io/tier4/scenario_simulator_v2:humble-${{ github.event.inputs.version }}
push: true
targets: |
${{ matrix.rosdistro }}_base_${{ matrix.arch }}
58 changes: 11 additions & 47 deletions .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: levonet/action-restore-branch@master

- name: Install bloom
run: apt update && apt install -y python3-bloom git
run: apt update && apt install -y python3-bloom git curl

- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -142,50 +142,14 @@ jobs:
repo: context.repo.repo,
ref: `heads/${context.payload.pull_request.head.ref}`,
})
push_docker:
needs: release
name: Push Docker Image
runs-on: ubuntu-22.04
timeout-minutes: 720
strategy:
matrix:
rosdistro: [humble]
arch: [amd64]
# Build test for arm64 CPU is broken.
# This is a temporary solution and will be repaired in the future.
# See also https://github.com/tier4/scenario_simulator_v2/pull/1295
# arch: [amd64, arm64]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false

- name: Install docker for ubuntu runner
uses: docker/setup-buildx-action@v3

- name: Install QEMU
uses: docker/setup-qemu-action@v3

- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push (${{ matrix.arch }})
uses: docker/bake-action@v3
with:
files: |
./docker-bake.hcl
workdir: .
set: |
*.cache-to=type=gha,mode=max
*.cache-from=type=gha
*.tags=ghcr.io/tier4/scenario_simulator_v2:humble-${{ needs.release.outputs.new_version }}
push: ${{ github.event.pull_request.merged == true }}
targets: |
${{ matrix.rosdistro }}_base_${{ matrix.arch }}
- name: Kick docker build action
if: github.event.pull_request.merged == true
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.BLOOM_GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/tier4/scenario_simulator_v2/actions/workflows/Docker.yaml/dispatches \
-d '{"ref":"master","inputs":{"version":"${{ steps.new_version.outputs.new_version }}"}}'
9 changes: 4 additions & 5 deletions .github/workflows/custom_spell.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"AUTORCC",
"Canonicalized",
"canonicalizing",
"cfamily",
"classname",
"Cmyk",
"Dawid",
"DBOOST",
"DBUILD",
Expand All @@ -14,11 +16,8 @@
"DWITH_INTEGRATION_TEST",
"engageable",
"euclidian",
"hakuturu",
"Kataoka",
"libunwind",
"linelint",
"Masaya",
"Mersenne",
"Monic",
"Moszynski",
Expand All @@ -40,8 +39,8 @@
"TESTRANDOMIZER",
"travelling",
"Tschirnhaus",
"walltime",
"xerces",
"xercesc",
"yamacir-kit"
"xercesc"
]
}
Loading

0 comments on commit bdfb24c

Please sign in to comment.