Skip to content

Commit

Permalink
adjust to usage of published action
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Haas committed Jun 12, 2024
1 parent fea8046 commit cea4c68
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
6 changes: 3 additions & 3 deletions automated-testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ All scenarios within the test catalog are also simulated and evaluated in an aut
#### Actions

We provide two [GitHub actions](../.github/actions/) for CARLOS:
We provide two [GitHub actions](https://docs.github.com/en/actions/creating-actions/about-custom-actions) for CARLOS:
- [generate-job-matrix](../.github/actions/generate-job-matrix/)
- [evaluate-scenario](../.github/actions/evaluate-scenario/)
- [carlos-ci-action](https://github.com/ika-rwth-aachen/carlos-ci-action)

They can be used within a GitHub CI workflow to create a job list of simulation runs, and consecutively run all simulations. A demonstration of this is presented next.

#### Workflow

The workflow presented in [automated-testing.yml](../.github/workflows/automated-testing.yml) combines the different actions and performs simulation evaluation analog to the local `evaluation-scenarios.sh`. It leverages the modularity and customizability of the provided actions by reusing them and configuring them differently. For example, the `generate-job-matrix` allows customizing the `query-string`, which is used for matching and collecting fitting scenarios as a job matrix for following pipeline steps.
The workflow presented in [automated-testing.yml](../.github/workflows/automated-testing.yml) combines the different actions and performs simulation evaluation analog to the local `evaluation-scenarios.sh`. It leverages the modularity and customizability of the provided actions by reusing them and configuring them differently. For example, `generate-job-matrix` allows customizing the `query-string`, which is used for matching and collecting fitting scenarios as a job matrix for following pipeline steps.

#### Self-Hosted GitHub Runner

Expand Down
18 changes: 18 additions & 0 deletions automated-testing/carla-sim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: carlos-ci-action
services:

carla-simulator:
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
privileged: True
environment:
DISPLAY: $DISPLAY
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
image: rwthika/carla-simulator:server
command: bash -ic './CarlaUE4.sh -nosound 2>/dev/null'
2 changes: 1 addition & 1 deletion automated-testing/evaluate-scenarios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ update-simulator() {
docker compose -f $COMPOSE_TEMPLATE_PATH pull
}

COMPOSE_TEMPLATE_PATH="../.github/actions/evaluate-scenario/files/template.yml"
COMPOSE_TEMPLATE_PATH="./template.yml"

while getopts "hopn" flag; do
case "$flag" in
Expand Down
26 changes: 26 additions & 0 deletions automated-testing/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:

carla-simulator:
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
privileged: True
environment:
DISPLAY: $DISPLAY
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
image: $SIMULATOR_IMAGE
command: bash -ic './CarlaUE4.sh -nosound $SIMULATOR_FLAGS 2>/dev/null'

carla-scenario-runner:
depends_on:
carla-simulator:
condition: service_healthy
volumes:
- $SCENARIO_FOLDER_PATH:/scenarios
image: $SCENARIO_RUNNER_IMAGE
command: bash -ic "python ./scenario_runner.py --host carla-simulator --openscenario /scenarios/$SCENARIO_FILE_NAME --output"

0 comments on commit cea4c68

Please sign in to comment.