Skip to content

Commit cc875a4

Browse files
authored
Rowzaw/GitHub action setup (#45)
Implement github actions workflow and fixup setup scripts
1 parent 2a0e627 commit cc875a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+186
-858
lines changed

.github/workflows/test.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Run setup and colcon build for Dev
2+
on: push
3+
jobs:
4+
setup_and_build_check:
5+
runs-on: ubuntu-22.04
6+
steps:
7+
- uses: actions/checkout@v4
8+
- name: enviroment setupg
9+
run: |
10+
export ROVERFLAKE_ROOT="${GITHUB_WORKSPACE}"
11+
yes | ./setup_scripts/setup_everything_common.sh
12+
- name: build
13+
run: |
14+
cd $ROVERFLAKE_ROOT
15+
echo $ROS_DISTRO
16+
source /opt/ros/humble/setup.bash
17+
echo $ROS_DISTRO
18+
colcon build --symlink-install --packages-skip sweeppy
19+
- name: Notify Discord (success)
20+
if: ${{ success() }}
21+
uses: appleboy/[email protected]
22+
with:
23+
webhook_id: ${{ secrets.DISCORD_BOT_WEBHOOK_ID }} # it also accepts full URL
24+
webhook_token: ${{ secrets.DISCORD_BOT_WEBHOOK_TOKEN }} # it also accepts full URL
25+
message: |
26+
*I'm happy now and I'll let you merge ${{ github.actor }}. _good job!_* || ${{ github.repository }} on `${{ github.ref_name }}`
27+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
28+
- name: Notify Discord (failure)
29+
if: ${{ failure() }}
30+
uses: appleboy/[email protected]
31+
with:
32+
webhook_id: ${{ secrets.DISCORD_BOT_WEBHOOK_ID }} # it also accepts full URL
33+
webhook_token: ${{ secrets.DISCORD_BOT_WEBHOOK_TOKEN }} # it also accepts full URL
34+
message: |
35+
_you have saddened me ${{ github.actor }}_
36+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
37+

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ build_isolated/
1818
devel_isolated/
1919
phidgetlog.log
2020

21+
# install files
22+
random_install_files/*
23+
24+
2125
# Generated by dynamic reconfigure
2226
*.cfgc
2327
/cfg/cpp/
@@ -64,3 +68,4 @@ log/
6468
**/TODO.md
6569

6670
.vscode/settings.json
71+

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,23 @@ _Obviously you are welcome to use HTTPS or another form of authentication (like
2121

2222
Then cd in, and we can use setup scripts from here.
2323

24+
Before using setup scripts, you need to set your `ROVERFLAKE_ROOT` enviroment variable. Its best to throw this in your .bashrc file so that it sets permanently.
25+
One liner to do that:
26+
> `echo "export ROVERFLAKE_ROOT=<path_to_roverflake>" >> ~/.bashrc`
27+
28+
If the repo is in your home directory, youd do:
29+
> `echo "export ROVERFLAKE_ROOT=/home/<your_user>/Roverflake2" >> ~/.bashrc`
30+
2431
> `bash setup_scripts/setup_everything_common.sh`
2532
2633
This script will install ros2, as well as other common dependencies.
2734

35+
After that script finishes, try to build!
36+
From the root of RoverFlake2:
37+
> `colcon build`
38+
(it should automatically use --symlink-install as set in `colcon_defaults.yaml`)
39+
40+
If you get an error... panic, scream, and hurl insults at your computer. Then look at common issues and ask for help in the discord.
2841

2942
### COMMON ISSUES & TROUBLESHOOTING
3043
arm_hardware_interface fails to build:

colcon.defaults.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build:
2+
cmake-args:
3+
- -DCMAKE_POLICY_DEFAULT_CMP0167=OLD
4+
- -DCMAKE_POLICY_DEFAULT_CMP0148=OLD

drcp

Lines changed: 0 additions & 1 deletion
This file was deleted.

rover_env/cbs_env_setup.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

rover_env/rover_aliases_common.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

rover_env/rover_env_common.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup_scripts/install-ros2-humble.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source $HOME/RoverFlake2/setup_scripts/utils/common.sh
1+
source $ROVERFLAKE_ROOT/setup_scripts/utils/common.sh
22

33
echo CHECKING FOR ROS2 DESKTOP
44
if is_package_installed "ros-humble-desktop"; then
@@ -23,14 +23,13 @@ else
2323
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
2424

2525
sudo apt update
26-
2726
sudo apt upgrade
2827

2928
sudo apt install ros-humble-desktop
30-
3129
sudo apt install ros-dev-tools
3230

3331
echo source /opt/ros/humble/setup.bash >> ~/.bashrc
32+
source ~/.bashrc
3433
fi
3534

3635
echo install-ros2-humble.sh complete.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
cd ${RANDOM_INSTALL_FILE_DIR}
2+
3+
# clone the sweep-sdk repository
4+
git clone https://github.com/scanse/sweep-sdk
5+
6+
# enter the libsweep directory
7+
cd sweep-sdk/libsweep
8+
9+
# create and enter a build directory
10+
mkdir -p build
11+
cd build
12+
13+
# build and install the libsweep library
14+
cmake .. -DCMAKE_BUILD_TYPE=Release
15+
cmake --build .
16+
sudo cmake --build . --target install
17+
sudo ldconfig
18+
19+
cd ${ROVERFLAKE_ROOT}

0 commit comments

Comments
 (0)