Skip to content

different version of jackalsim. #3

different version of jackalsim.

different version of jackalsim. #3

Workflow file for this run

name: 'build'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
- name: Create src directory
run: mkdir -p src
- name: Disable NVidia runtime in the container
run: sed -i '/"--runtime=nvidia",/d' .devcontainer/devcontainer.json
- name: Checkout private planner
uses: actions/checkout@v3
with:
repository: oscardegroot/mpc_planner
token: ${{ secrets.CI_REPO_PAT }}
path: src/mpc_planner
ref: main
- name: Checkout private guidance planner
uses: actions/checkout@v3
with:
repository: tud-amr/guidance_planner
token: ${{ secrets.CI_REPO_PAT }}
path: src/guidance_planner
ref: main
- name: Build dev container task
uses: devcontainers/[email protected]
with:
runCmd: |
chmod +x setup.sh
chmod +x build.sh
./setup.sh -y
./build.sh jackalsimulator True
- name: Run dev container task
uses: devcontainers/[email protected]
with:
runCmd: |
source /opt/ros/noetic/setup.sh && source /workspace/devel/setup.bash && source /workspace/fix_console.sh && roslaunch mpc_planner_jackalsimulator ros1_jackalsimulator.launch
- name: Check result
id: check_file
uses: devcontainers/[email protected]
with:
runCmd: |
FILE="/workspace/src/mpc_planner/data/none.txt"
MIN_SIZE_KB=10 # Set the minimum file size in KB
if [ -f "$FILE" ]; then
FILE_SIZE=$(du -k "$FILE" | cut -f1) # Get file size in KB
if [ "$FILE_SIZE" -ge "$MIN_SIZE_KB" ]; then
echo "File size is greater than or equal to ${MIN_SIZE_KB} KB"
echo "::set-output name=file_large_enough::true"
else
echo "File size is smaller than ${MIN_SIZE_KB} KB"
echo "::set-output name=file_large_enough::false"
exit 1 # Exit with failure if the file size is too small
fi
else
echo "File does not exist"
echo "::set-output name=file_large_enough::false"
exit 1 # Exit with failure if the file doesn't exist
fi
# Step 3: Do something if the file is large enough
- name: Run step if file size is large enough
uses: devcontainers/[email protected]
if: steps.check_file.outputs.file_large_enough == 'true'
with:
runCmd: |
echo "Running the experiment succeeded."