Compare commits

..

12 Commits

Author SHA1 Message Date
Oleg Kalachev
e2c43a8579 Update PX4 to 1.13.3 2023-04-12 02:07:48 +03:00
Oleg Kalachev
9a8d612079 Update PX4 to v1.13.2 2023-04-12 02:03:14 +03:00
Oleg Kalachev
7f092273b7 Run the script to create www directory to serve 2022-11-11 00:21:51 +06:00
Oleg Kalachev
9e287da28a Allow to run build workflow on demand
To allow triggering when Clover package gets updated
2022-11-08 00:51:09 +06:00
Oleg Kalachev
d814ea6ddc Run Clover's tests (#11) 2022-11-07 22:23:29 +06:00
Oleg Kalachev
39fdbce2e0 Fix image_view validation 2022-10-07 20:41:09 +06:00
Oleg Kalachev
16ff042dfa Install missing image-view package 2022-10-07 14:50:53 +06:00
Oleg Kalachev
afebd32949 Don't install openjdk and gcc-arm-none-eabi to reduce size (#10) 2022-08-15 19:16:21 +03:00
Oleg Kalachev
83dcad6556 Output image size 2022-08-11 05:58:03 +03:00
Oleg Kalachev
19c99972d8 Update PX4 to v1.13 (#9) 2022-07-29 17:31:39 +03:00
Oleg Kalachev
dbe7fa334b Make wget don't spam to log 2022-07-29 08:52:37 +03:00
Oleg Kalachev
60e0fcc6b4 Update runner to macos-12 as macos-10.15 is deprecated
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
2022-07-22 01:43:58 +03:00
2 changed files with 37 additions and 16 deletions

View File

@@ -7,10 +7,11 @@ on:
branches: [ master ] branches: [ master ]
release: release:
types: [ created ] types: [ created ]
workflow_dispatch:
jobs: jobs:
build: build:
runs-on: macos-10.15 # Using macOS as https://github.com/actions/virtual-environments/issues/183 runs-on: macos-12 # Using macOS as https://github.com/actions/virtual-environments/issues/183
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Download base image - name: Download base image
@@ -19,6 +20,8 @@ jobs:
wget --progress=dot:giga https://clovervm.ams3.digitaloceanspaces.com/base-focal.ova -O output-virtualbox-iso/clover-devel.ova wget --progress=dot:giga https://clovervm.ams3.digitaloceanspaces.com/base-focal.ova -O output-virtualbox-iso/clover-devel.ova
- name: Build - name: Build
run: ./build.sh run: ./build.sh
- name: Image size
run: ls -lh output-virtualbox-ovf
- name: Upload - name: Upload
if: ${{ github.event_name == 'release' }} if: ${{ github.event_name == 'release' }}
# Not using ready S3 actions, because they either don't run on macOS machines or don't support changing the endpoint # Not using ready S3 actions, because they either don't run on macOS machines or don't support changing the endpoint

View File

@@ -55,16 +55,16 @@ echo "--- Installing Clover's Python dependencies"
sudo -E sh -c '/usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requirements.txt' sudo -E sh -c '/usr/bin/python3 -m pip install -r ~/catkin_ws/src/clover/clover/requirements.txt'
echo "--- Downloading PX4" echo "--- Downloading PX4"
git clone --recursive --depth 1 --branch v1.13.0 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot git clone --recursive --depth 1 --branch v1.13.3 https://github.com/PX4/PX4-Autopilot.git ~/PX4-Autopilot
ln -s ~/PX4-Autopilot ~/catkin_ws/src/ ln -s ~/PX4-Autopilot ~/catkin_ws/src/
ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/ ln -s ~/PX4-Autopilot/Tools/sitl_gazebo ~/catkin_ws/src/
#ln -s ~/PX4-Autopilot/src/modules/mavlink/mavlink ~/catkin_ws/src/
#git clone --depth 1 https://github.com/mavlink/c_library_v2.git ~/catkin_ws/src/mavlink/ # FIXME:
echo "--- Installing PX4 dependencies" echo "--- Installing PX4 dependencies"
~/PX4-Autopilot/Tools/setup/ubuntu.sh echo "progress=dot:giga" > ~/.wgetrc # make wget don't spam to log
~/PX4-Autopilot/Tools/setup/ubuntu.sh --no-nuttx
rm ~/.wgetrc
pip3 install --user toml pip3 install --user toml
sudo -E sh -c 'apt-get install -y ant openjdk-11-jdk' # Additional packages for jMAVSim # sudo -E sh -c 'apt-get install -y ant openjdk-11-jdk' # Additional packages for jMAVSim
echo "--- Patching mavlink_sitl_gazebo" echo "--- Patching mavlink_sitl_gazebo"
# See https://github.com/PX4/PX4-SITL_gazebo/pull/872 # See https://github.com/PX4/PX4-SITL_gazebo/pull/872
@@ -81,14 +81,16 @@ ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS
echo "--- Installing geographiclib datasets" echo "--- Installing geographiclib datasets"
sudo -E sh -c '/opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh' sudo -E sh -c '/opt/ros/noetic/lib/mavros/install_geographiclib_datasets.sh'
echo "--- Build mavlink and fix issues" echo "--- Build mavlink"
cd ~/catkin_ws cd ~/catkin_ws
catkin_make mavlink_c_generate catkin_make mavlink_c_generate -DCATKIN_WHITELIST_PACKAGES="px4" # at first build PX4's mavlink to enforce mavlink_sitl_gazebo using it
ln -s "." build/mavlink/mavlink ln -s "." build/mavlink/mavlink # fix https://github.com/PX4/PX4-Autopilot/pull/19964
rm build/CMakeCache.txt
echo "--- Building the workspace" echo "--- Building the workspace"
catkin_make --force-cmake catkin_make -DCATKIN_WHITELIST_PACKAGES=""
echo "--- Running tests"
catkin_make run_tests && catkin_test_results
echo "--- Installing Visual Studio Code" echo "--- Installing Visual Studio Code"
sudo -E sh -c 'apt-get update; apt-get install -y curl' sudo -E sh -c 'apt-get update; apt-get install -y curl'
@@ -150,9 +152,10 @@ sed "s/pi/${USER}/g" ${HOME}/catkin_ws/src/clover/builder/assets/monkey | sudo t
sudo -E sh -c "sed -i 's/SymLink Off/SymLink On/' /etc/monkey/monkey.conf" sudo -E sh -c "sed -i 's/SymLink Off/SymLink On/' /etc/monkey/monkey.conf"
sudo cp ${HOME}/catkin_ws/src/clover/builder/assets/monkey.service /etc/systemd/system/monkey.service sudo cp ${HOME}/catkin_ws/src/clover/builder/assets/monkey.service /etc/systemd/system/monkey.service
sudo systemctl enable monkey sudo systemctl enable monkey
rosrun clover www # create directory to serve
echo "--- Installing additional packages" echo "--- Installing additional packages"
sudo -E sh -c 'apt-get update; apt-get install -y sshfs gvfs-fuse gvfs-backends python3-opencv byobu ipython3 byobu nmap lsof tmux vim ros-noetic-rqt-multiplot' sudo -E sh -c 'apt-get update; apt-get install -y sshfs gvfs-fuse gvfs-backends python3-opencv byobu ipython3 byobu nmap lsof tmux vim ros-noetic-usb-cam ros-noetic-rqt-multiplot ros-noetic-image-view'
echo "--- Personalizing VM" echo "--- Personalizing VM"
sudo -E sh -c 'cp /usr/share/xfce4/backdrops/xubuntu-wallpaper.png /usr/share/xfce4/backdrops/xubuntu-wallpaper-old.png; cp ${HOME}/Pictures/Logo_COEX_2019_white_on_black.png /usr/share/xfce4/backdrops/xubuntu-wallpaper.png' sudo -E sh -c 'cp /usr/share/xfce4/backdrops/xubuntu-wallpaper.png /usr/share/xfce4/backdrops/xubuntu-wallpaper-old.png; cp ${HOME}/Pictures/Logo_COEX_2019_white_on_black.png /usr/share/xfce4/backdrops/xubuntu-wallpaper.png'
@@ -183,7 +186,6 @@ pip --version
pip3 --version pip3 --version
monkey --version monkey --version
systemctl --version systemctl --version
# TODO: add Python tests
roscore -h roscore -h
rosversion px4 rosversion px4
@@ -200,19 +202,35 @@ rosversion tf2_web_republisher
rosversion cv_camera rosversion cv_camera
rosversion web_video_server rosversion web_video_server
rosversion nodelet rosversion nodelet
rosversion image_view
echo "--- Run Clover's Python libraries validation" echo "--- Validating PX4 builds"
cd ~/PX4-Autopilot
make px4_sitl # regular sitl build
# sudo -E sh -c 'apt-get install -y gcc-arm-none-eabi'
# make px4_fmu-v4_default
make clean
echo "--- Run Clover's Python and shell tests"
source ~/catkin_ws/devel/setup.bash
export VM=1
$HOME/catkin_ws/src/clover/builder/test/tests.py
$HOME/catkin_ws/src/clover/builder/test/tests_py3.py $HOME/catkin_ws/src/clover/builder/test/tests_py3.py
$HOME/catkin_ws/src/clover/builder/test/tests.sh
echo "--- Versions of all installed ROS packages" echo "--- Versions of all installed ROS packages"
set +x set +x
rospack list-names | while read line; do echo $line `rosversion $line`; done rospack list-names | while read line; do echo $line `rosversion $line`; done
set -x set -x
echo "Trying running the Gazebo simulator, check the output" echo "--- Largest packages installed"
sudo -E sh -c 'apt-get install -y debian-goodies'
dpigs -H -n 30
echo "--- Trying running the Gazebo simulator, check the output"
timeout --preserve-status 30 roslaunch clover_simulation simulator.launch gui:=false --screen timeout --preserve-status 30 roslaunch clover_simulation simulator.launch gui:=false --screen
echo "Trying running jMAVSim, check the output" echo "--- Trying running jMAVSim, check the output"
# cd ~/PX4-Autopilot # cd ~/PX4-Autopilot
# HEADLESS=1 timeout --preserve-status 30 make px4_sitl jmavsim # HEADLESS=1 timeout --preserve-status 30 make px4_sitl jmavsim
HEADLESS=1 timeout --preserve-status 30 roslaunch clover_simulation simulator.launch type:=jmavsim gui:=false --screen HEADLESS=1 timeout --preserve-status 30 roslaunch clover_simulation simulator.launch type:=jmavsim gui:=false --screen