diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f28433f..af0e3b0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ # All files require approval from Principals -* @We-Autopilot/p-c-principals +* @We-Autopilot/p-c-lead diff --git a/.github/workflows/colcon_build.yml b/.github/workflows/colcon_build.yml new file mode 100644 index 0000000..5731215 --- /dev/null +++ b/.github/workflows/colcon_build.yml @@ -0,0 +1,45 @@ +on: + workflow_dispatch: {} + push: + branches: + - main + - colcon_script/logan + pull_request: + branches: + - main + +jobs: + build: + runs-on: self-hosted + + env: + BUILD_TYPE: Release + RUN_TESTS: 'true' + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Source ROS 2 environment + run: | + source /opt/ros/jazzy/setup.bash + echo "ROS 2 environment sourced" + + - name: Install workspace dependencies + run: | + source /opt/ros/jazzy/setup.bash + rosdep update + rosdep install --from-paths src --ignore-src -iry + + - name: Build workspace with colcon + run: | + source /opt/ros/jazzy/setup.bash + colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} + + - name: Run tests + if: ${{ env.RUN_TESTS == 'true' }} + run: | + source /opt/ros/jazzy/setup.bash + source install/setup.bash + colcon test --packages-select ap1_control + colcon test-result --verbose