Add development guide to landing page quick links & update README.md #160
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: Merge Build | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: read | |
| concurrency: | |
| group: mergebuild-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| detect_changes: | |
| name: Detect Changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| all: ${{ steps.filter.outputs.all }} | |
| ros_ws: ${{ steps.filter.outputs.ros_ws }} | |
| # payload_controller: ${{ steps.filter.outputs.payload_controller }} | |
| # gcs: ${{ steps.filter.outputs.gcs }} | |
| docs: ${{ steps.filter.outputs.docs }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 # don't checkout submodules | |
| - name: Detect changed paths | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | # TODO: add docs, payload_controller, and gcs | |
| all: | |
| - 'ci/**' | |
| - '.github/workflows/mergebuild.yml' | |
| - 'dev_env.sh' | |
| ros_ws: | |
| - 'controls/sae_2025_ws/**' | |
| docs: | |
| - 'docs/**' | |
| - '.github/actions/build-docs/action.yaml' | |
| validate_ros_workspace: | |
| name: Validate ROS Workspace | |
| needs: detect_changes | |
| runs-on: ubuntu-latest | |
| if: needs.detect_changes.outputs.ros_ws == 'true' || needs.detect_changes.outputs.all == 'true' | |
| container: | |
| image: ghcr.io/pennaerial/monorepo:latest | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout PR | |
| working-directory: /root/monorepo | |
| run: | | |
| git fetch origin "${{ github.sha }}" | |
| git checkout "${{ github.sha }}" | |
| bash ci/update_submodules.sh | |
| - name: Quick Install Dependencies | |
| run: | | |
| "$PENNAIR_MONOREPO_PATH/ci/install_deps.sh" --quick | |
| - name: Build ROS Packages | |
| run: | | |
| "$PENNAIR_SAE_WS_PATH/scripts/ci/build_ros.sh" --quick | |
| - name: Run Unit Tests | |
| shell: bash | |
| run: | | |
| # shellcheck disable=SC1090 | |
| source "/opt/ros/$ROS_DISTRO/setup.bash" | |
| source "$PENNAIR_SAE_WS_PATH/install/setup.bash" | |
| source "$PENNAIR_SAE_WS_PATH/.aliasrc" # imports the bash testing functions | |
| cd "$PENNAIR_SAE_WS_PATH" | |
| ct | |
| docs: | |
| name: Build Docs | |
| needs: detect_changes | |
| runs-on: ubuntu-latest | |
| if: needs.detect_changes.outputs.docs == 'true' || needs.detect_changes.outputs.all == 'true' | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Build Docs | |
| uses: ./.github/actions/build-docs | |
| with: | |
| deploy: "false" | |
| merge_build_status: | |
| name: Merge Build Status | |
| needs: # depend on each additional job here | |
| - validate_ros_workspace | |
| - docs | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check validation results | |
| env: | |
| ROS_WS_RESULT: ${{ needs.validate_ros_workspace.result }} | |
| DOCS_RESULT: ${{ needs.docs.result }} | |
| run: | | |
| # Create a map of different mergebuild jobs to check. MODIFY THIS IF ADDING A MERGEBUILD JOB | |
| declare -A checks=( | |
| ["ROS Workspace"]="$ROS_WS_RESULT" | |
| ["Docs"]="$DOCS_RESULT" | |
| ) | |
| failed=0 | |
| echo "Validation results:" | |
| for name in "${!checks[@]}"; do | |
| result="${checks[$name]}" | |
| echo " $name: $result" | |
| if [[ "$result" != "success" && "$result" != "skipped" ]]; then | |
| echo "::error::$name validation failed ($result)" | |
| failed=1 | |
| fi | |
| done | |
| if [[ "$failed" -ne 0 ]]; then | |
| exit 1 | |
| fi | |
| echo "All applicable validations passed." |