Fix the cpp interface of Acados in mpc_planner and pin the version of acados #8
Workflow file for this run
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
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: 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." |