Skip to content

Commit

Permalink
Build: update macOS CI scripts
Browse files Browse the repository at this point in the history
- Remove macOS-12 build.
- Add builds for macOS-14 and macOS-15.
- Use Python virtual environment.
- Remove --user installs.
- Update to Gazebo Harmonic
- Install libboost-iostreams-dev
- Install libboost-filesystem-dev

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
  • Loading branch information
srmainwaring committed Dec 31, 2024
1 parent d2ec631 commit 80abdee
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/brew_install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ brew tap osrf/simulation

# packages to install
PKGS=(
gz-garden
gz-harmonic
cgal
fftw
)
Expand Down
11 changes: 3 additions & 8 deletions .github/scripts/macos_build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Configure build dependencies
# https://gazebosim.org/docs/garden/install_osx_src#install-dependencies
# https://gazebosim.org/docs/harmonic/install_osx_src#install-dependencies

# dartsim@6.10.0
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/usr/local/opt/dartsim@6.10.0
Expand All @@ -10,10 +10,5 @@ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/opt/dartsim@6.10.0/lib/pkgc
# qt5
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/usr/local/opt/qt@5

# Python scripts installed with: `pip3 install --user <package>`
export PATH=$PATH:$HOME/Library/Python/3.11/bin:$HOME/Library/Python/3.12/bin

# Use desktop_notification- to suppress error:
# ERROR:colcon.colcon_notification.desktop_notification.terminal_notifier:
# Could not find the colcon-terminal-notifier.app in the install prefix '/Users/runner/Library/Python/3.12'
colcon build --symlink-install --merge-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_MACOSX_RPATH=FALSE -DCMAKE_INSTALL_NAME_DIR=$(pwd)/install/lib --event-handlers desktop_notification-
export GZ_VERSION=harmonic
colcon build --symlink-install --merge-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_MACOSX_RPATH=FALSE -DCMAKE_INSTALL_NAME_DIR=$(pwd)/install/lib
4 changes: 1 addition & 3 deletions .github/scripts/macos_test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

# Python scripts installed with: `pip3 install --user <package>`
export PATH=$PATH:$HOME/Library/Python/3.11/bin:$HOME/Library/Python/3.12/bin

export GZ_VERSION=harmonic
colcon test --merge-install
colcon test-result --all --verbose
24 changes: 0 additions & 24 deletions .github/workflows/macos12-monterey-build-tools.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/macos12-monterey-ci.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/macos13-ventura-build-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ jobs:

- name: Install Build Tools
run: |
pip3 install --user vcstool
pip3 install --user colcon-common-extensions
python3 -m venv /Users/runner/venv
source /Users/runner/venv/bin/activate
python3 -m pip install vcstool
python3 -m pip install colcon-common-extensions
- name: Check Build Tools
run: |
source /Users/runner/venv/bin/activate
which pip3
which python3
python3 --version
export PATH=$PATH:/Users/runner/Library/Python/3.11/bin:/Users/runner/Library/Python/3.12/bin
colcon graph
10 changes: 8 additions & 2 deletions .github/workflows/macos13-ventura-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ jobs:
- name: Install Build Tools
run: |
python3 -m pip install --user vcstool
python3 -m pip install --user colcon-common-extensions
python3 -m venv /Users/runner/venv
source /Users/runner/venv/bin/activate
python3 -m pip install vcstool
python3 -m pip install colcon-common-extensions
- name: Build Wave Sim
run: |
source /Users/runner/venv/bin/activate
export GZ_VERSION=harmonic
bash ./.github/scripts/macos_build.sh
- name: Test Wave Sim
run: |
source /Users/runner/venv/bin/activate
export GZ_VERSION=harmonic
bash ./.github/scripts/macos_test.sh
26 changes: 26 additions & 0 deletions .github/workflows/macos14-sonoma-build-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: macOS Sonoma Build Tools

on: [pull_request]

jobs:
macos-14-ci:
runs-on: macos-14
name: macOS Sonoma Build Tools
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Build Tools
run: |
python3 -m venv /Users/runner/venv
source /Users/runner/venv/bin/activate
python3 -m pip install vcstool
python3 -m pip install colcon-common-extensions
- name: Check Build Tools
run: |
source /Users/runner/venv/bin/activate
which pip3
which python3
python3 --version
colcon graph
26 changes: 26 additions & 0 deletions .github/workflows/macos15-sequoia-build-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: macOS Sequoia Build Tools

on: [pull_request]

jobs:
macos-15-ci:
runs-on: macos-15
name: macOS Sequoia Build Tools
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Build Tools
run: |
python3 -m venv /Users/runner/venv
source /Users/runner/venv/bin/activate
python3 -m pip install vcstool
python3 -m pip install colcon-common-extensions
- name: Check Build Tools
run: |
source /Users/runner/venv/bin/activate
which pip3
which python3
python3 --version
colcon graph
8 changes: 5 additions & 3 deletions .github/workflows/ubuntu-jammy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Build Essentials
run: |
sudo apt-get update
sudo apt-get install wget lsb-release gnupg curl
sudo apt-get install wget lsb-release gnupg curl libboost-iostreams-dev libboost-filesystem-dev
- name: Install Build Tools
run: |
Expand All @@ -24,12 +24,12 @@ jobs:
sudo apt-get update
sudo apt-get install python3-pip python3-vcstool python3-colcon-common-extensions
- name: Install Gazebo Garden
- name: Install Gazebo Harmonic
run: |
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt-get update
sudo apt-get install gz-garden
sudo apt-get install gz-harmonic
- name: Install Wave Sim Dependencies
run: |
Expand All @@ -38,9 +38,11 @@ jobs:
- name: Build Wave Sim
run: |
export GZ_VERSION=harmonic
colcon build --symlink-install --merge-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_STANDARD=17 -DBUILD_TESTING=ON
- name: Test Wave Sim
run: |
export GZ_VERSION=harmonic
colcon test --merge-install
colcon test-result --all --verbose

0 comments on commit 80abdee

Please # to comment.