-
Notifications
You must be signed in to change notification settings - Fork 71
77 lines (69 loc) · 2.49 KB
/
clp-core-build-macos.yaml
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
name: "clp-core-build-macos"
on:
pull_request:
paths:
- ".github/workflows/clp-core-build-macos.yaml"
- "components/core/cmake/**"
- "components/core/CMakeLists.txt"
- "components/core/src/**"
- "components/core/tests/**"
- "components/core/tools/scripts/lib_install/macos/**"
- "components/core/tools/scripts/deps-download/**"
- "components/core/tools/scripts/utils/build-and-run-unit-tests.py"
- "deps-tasks.yml"
- "Taskfile.yml"
- "tools/scripts/deps-download/**"
push:
paths:
- ".github/workflows/clp-core-build-macos.yaml"
- "components/core/cmake/**"
- "components/core/CMakeLists.txt"
- "components/core/src/**"
- "components/core/tests/**"
- "components/core/tools/scripts/lib_install/macos/**"
- "components/core/tools/scripts/deps-download/**"
- "components/core/tools/scripts/utils/build-and-run-unit-tests.py"
- "deps-tasks.yml"
- "Taskfile.yml"
- "tools/scripts/deps-download/**"
workflow_dispatch:
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true
jobs:
build-macos:
strategy:
matrix:
runner: ["macos-13", "macos-14"]
use_shared_libs: [true, false]
runs-on: "${{matrix.runner}}"
steps:
- uses: "actions/checkout@v4"
with:
submodules: "recursive"
# See https://github.com/actions/setup-python/issues/577
- name: "Remove preinstalled binaries which conflict with brew's installs"
run: |
rm -f /usr/local/bin/2to3*
rm -f /usr/local/bin/go*
rm -f /usr/local/bin/idle3*
rm -f /usr/local/bin/pydoc3*
rm -f /usr/local/bin/python3*
- name: "Install dependencies"
run: "./components/core/tools/scripts/lib_install/macos/install-all.sh"
- run: "./tools/scripts/deps-download/init.sh"
shell: "bash"
- run: "task deps:core"
shell: "bash"
- name: "Build CLP-core and run unit tests"
shell: "bash"
working-directory: "./components/core"
# NOTE: We omit the Stopwatch tests since GH's macOS runner is too slow
run: >-
python3 ./tools/scripts/utils/build-and-run-unit-tests.py
${{matrix.use_shared_libs == 'true' && '--use-shared-libs' || ''}}
--source-dir .
--build-dir build
--num-jobs $(getconf _NPROCESSORS_ONLN)
--test-spec "~[Stopwatch]"