Skip to content

Commit

Permalink
CI: update macOS workflow
Browse files Browse the repository at this point in the history
- Add Python 3.12 scripts to path (colcon is installed with Python 3.12).
- Rename workflows to include macOS version number.
- Add workflows for macOS Ventura and Sonoma.
- Remove workflow for macOS Sonoma.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
  • Loading branch information
srmainwaring committed Dec 17, 2023
1 parent 63c31c6 commit 1c81bec
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/macos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/opt/dartsim@6.10.0/lib/pkgc
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
export PATH=$PATH:$HOME/Library/Python/3.11/bin:$HOME/Library/Python/3.12/bin

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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: macOS Monterey Build Tools

on: [push, pull_request]
on: [pull_request]

jobs:
macos-monterey-ci:
Expand All @@ -20,5 +20,5 @@ jobs:
which pip3
which python3
python3 --version
export PATH=$PATH:/Users/runner/Library/Python/3.11/bin
export PATH=$PATH:/Users/runner/Library/Python/3.11/bin:/Users/runner/Library/Python/3.12/bin
colcon graph
File renamed without changes.
24 changes: 24 additions & 0 deletions .github/workflows/macos13-ventura-build-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: macOS Ventura Build Tools

on: [pull_request]

jobs:
macos-ventura-ci:
runs-on: macos-13
name: macOS Ventura Build Tools
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Build Tools
run: |
pip3 install --user vcstool
pip3 install --user colcon-common-extensions
- name: Check Build Tools
run: |
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
42 changes: 42 additions & 0 deletions .github/workflows/macos13-ventura-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: macOS Ventura CI

on: [pull_request]

jobs:
macos-ventura-ci:
runs-on: macos-13
name: macOS Ventura CI
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache brew packages
id: cache-brew-packages
uses: actions/cache@v3
with:
path: |
/usr/local/Cellar
/usr/local/Frameworks
/usr/local/Homebrew
/usr/local/bin
/usr/local/lib
/usr/local/opt
/usr/local/share
key: macos-build-cache-${{ hashFiles('./.github/scripts/brew_install_deps.sh') }}

- name: Install brew packages
run: |
bash ./.github/scripts/brew_install_deps.sh
- name: Install Build Tools
run: |
python3 -m pip install --user vcstool
python3 -m pip install --user colcon-common-extensions
- name: Build Wave Sim
run: |
bash ./.github/scripts/macos_build.sh
- name: Test Wave Sim
run: |
bash ./.github/scripts/macos_test.sh

0 comments on commit 1c81bec

Please sign in to comment.