-
Notifications
You must be signed in to change notification settings - Fork 920
108 lines (90 loc) · 3.19 KB
/
build-macos.yml
File metadata and controls
108 lines (90 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: macOS CI
on:
pull_request:
paths-ignore:
- '**.md'
- '**.ipynb'
- 'myst.yml'
# Cancels any in-progress workflow runs for the same PR when a new push is made,
# allowing the runner to become available more quickly for the latest changes.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.name }} ${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
env:
CTEST_OUTPUT_ON_FAILURE: ON
CTEST_PARALLEL_LEVEL: 2
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
GTSAM_BUILD_UNSTABLE: ${{ matrix.build_unstable }}
GTSAM_ALLOW_DEPRECATED_SINCE_V43: OFF
strategy:
fail-fast: true
matrix:
# Github Actions requires a single row to be added to the build matrix.
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name: [
macos-15-xcode-16,
macos-15-xcode-16-boost,
macos-15-xcode-16-geographiclib,
]
build_type: [Debug, Release]
build_unstable: [ON]
include:
- name: macos-15-xcode-16
os: macos-15
compiler: xcode
version: "16"
- name: macos-15-xcode-16-boost
os: macos-15
compiler: xcode
version: "16"
- name: macos-15-xcode-16-geographiclib
os: macos-15
compiler: xcode
version: "16"
exclude:
- name: macos-15-xcode-16-boost
build_type: Debug
- name: macos-15-xcode-16-geographiclib
build_type: Debug
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Homebrew (robust)
shell: bash
run: |
set -euxo pipefail
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_FROM_API=1
export HOMEBREW_CURL_RETRIES=5
brew update-reset -q || true
brew tap --repair || true
brew analytics off || true
# (optional) Show outdated without failing the job
brew outdated || true
- name: Set up compilers
run: |
sudo xcode-select -switch /Applications/Xcode.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Install Boost
if: contains(matrix.name, 'boost') && matrix.build_type == 'Release'
run: |
brew update
brew upgrade boost --quiet || brew install boost --quiet
echo "GTSAM_USE_BOOST_FEATURES=ON" >> $GITHUB_ENV
echo "GTSAM_ENABLE_BOOST_SERIALIZATION=ON" >> $GITHUB_ENV
- name: Install GeographicLib
if: contains(matrix.name, 'geographiclib') && matrix.build_type == 'Release'
run: |
brew upgrade geographiclib --quiet || brew install geographiclib --quiet
echo "GTSAM_ENABLE_GEOGRAPHICLIB=ON" >> $GITHUB_ENV
- name: Enable Consistency Checks (Debug)
if: matrix.build_type == 'Debug'
run: |
echo "GTSAM_ENABLE_CONSISTENCY_CHECKS=ON" >> $GITHUB_ENV
- name: Build and Test
run: bash .github/scripts/unix.sh -t