-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (89 loc) · 2.78 KB
/
ci-mac.yml
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
109
110
111
112
# SPDX-FileCopyrightText: 2022 - 2023 Peter Urban, Ghent University
#
# SPDX-License-Identifier: CC0-1.0
name: mac
on:
push:
branches: [ main ]
paths-ignore:
- '.github/workflows/python-package*'
- '.github/workflows/cibuildwheels*'
- '.github/workflows/conda*'
- '.github/workflows/test_*'
- 'conda.recipe/*'
- '*.md'
- 'doc/*'
#paths:
# - "**meson.build"
# - "**.cpp"
# - "**.c"
# - "**.h"
pull_request:
branches: [ main ]
paths-ignore:
- '.github/workflows/python-package*'
- '.github/workflows/cibuildwheels*'
- '.github/workflows/conda*'
- '.github/workflows/test_*'
- 'conda.recipe/*'
- '*.md'
- 'doc/*'
#paths:
# - "**meson.build"
# - "**.cpp"
# - "**.c"
# - "**.h"
# make sure that multiple jobs don't run for the same action (new commits cancel old jobs when they are still running)
# Souce Ralf Gommers (commit to meson-python)
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
#BUILD_TYPE: Release
jobs:
macos:
name: ci on macOS
runs-on: macos-12
strategy:
fail-fast: false
matrix:
cxx_compiler: ["$(brew --prefix llvm@17)/bin/clang++"]
# env does not work here because is resolved as string and not command
# env:
# CXX: ${{ matrix.cxx_compiler }}
steps:
- uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: checkout main repository
uses: actions/checkout@v3
with:
submodules: recursive
lfs: false
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: super-ci-mac # name for the cache
# install clang 15
- run: brew install coreutils llvm@17
- run: brew install libomp boost
- run: pip install meson meson-python ninja pytest numpy
# LDFLAGS="-L/opt/homebrew/opt/libomp/lib" CPPFLAGS="-I/opt/homebrew/opt/libomp/include"
- name: configure meson
run: CXX=${{ matrix.cxx_compiler }} meson setup builddir/; meson configure builddir -Dpython.install_env=auto
- name: compile project
run: meson compile -C builddir/
- name: test (cpp)
run: meson test -C builddir/ --print-errorlogs
- name: install project
run: meson install -C builddir/
- name: install pip requirements
run: pip install -r requirements.txt
- name: test (pytest)
run: pytest -v
- uses: actions/upload-artifact@v1
if: failure()
with:
name: ${{matrix.container}}_testlog
path: builddir/meson-logs/testlog.txt