Reworked and Stable Sonar Object/Wall Detection #652
This file contains hidden or 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-and-lint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build-and-lint: | |
| name: Build and Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create .env file | |
| run: | | |
| echo "ENABLE_GIT=false" >> .env | |
| echo "USER_UID=$(id -u)" >> .env | |
| echo "USER_GID=$(id -g)" >> .env | |
| - name: Build Docker image | |
| run: ./docker-build.sh --github-action | |
| - name: Run Docker container | |
| id: run-docker | |
| run: docker compose up -d | |
| - name: Lint Files | |
| run: | | |
| docker compose exec robosub-ros2 bash /home/ubuntu/robosub-ros2/.github/workflows/lint.sh | |
| - name: Build ROS2 | |
| if: always() && steps.run-docker.outcome == 'success' | |
| run: | | |
| docker compose exec robosub-ros2 bash /home/ubuntu/robosub-ros2/.github/workflows/build.sh | |
| - name: Compile Arduino Sketches | |
| if: always() && steps.run-docker.outcome == 'success' | |
| run: | | |
| docker compose exec robosub-ros2 bash /home/ubuntu/robosub-ros2/.github/workflows/compile-arduino-sketches.sh | |
| - name: Build Foxglove environment | |
| id: build-foxglove | |
| if: always() && steps.run-docker.outcome == 'success' | |
| run: | | |
| docker compose exec robosub-ros2 bash /home/ubuntu/robosub-ros2/.github/workflows/build-foxglove.sh | |
| - name: Lint Foxglove monorepo | |
| if: always() && steps.build-foxglove.outcome == 'success' | |
| run: | | |
| docker compose exec robosub-ros2 bash /home/ubuntu/robosub-ros2/.github/workflows/lint-foxglove.sh | |
| - name: Install Foxglove extensions | |
| if: always() && steps.build-foxglove.outcome == 'success' | |
| run: | | |
| docker compose exec robosub-ros2 bash /home/ubuntu/robosub-ros2/.github/workflows/install-foxglove.sh |