1
1
name : Build
2
2
3
- on : [push, pull_request]
3
+ on : [pull_request] # TODO: only on tags
4
4
5
5
jobs :
6
6
build_wheels :
@@ -10,30 +10,26 @@ jobs:
10
10
fail-fast : false
11
11
matrix :
12
12
include :
13
- - os : ubuntu-latest
14
- label : " linux-target-x86_64 "
15
- - os : macos-13
16
- label : " macos-target-x86_64 "
13
+ - label : " linux-target-x86_64 "
14
+ os : ubuntu-latest
15
+ - label : " macos-target-x86_64 "
16
+ os : macos-13
17
17
env :
18
18
MACOSX_DEPLOYMENT_TARGET : " 10.15"
19
19
CIBW_ARCHS_MACOS : " x86_64"
20
- - os : macos-13
20
+ - os : macos-14
21
21
label : " macos-target-arm64"
22
22
env :
23
23
MACOSX_DEPLOYMENT_TARGET : " 11.0"
24
24
CIBW_ARCHS_MACOS : " arm64"
25
- CC : " Clang"
26
- CXX : " Clang++"
25
+ CMAKE_ARGS : " -DNIFTY_LS_OPENMP=OFF"
27
26
28
27
env :
29
28
MACOSX_DEPLOYMENT_TARGET : ${{ matrix.env.MACOSX_DEPLOYMENT_TARGET }}
30
29
CIBW_ARCHS_MACOS : ${{ matrix.env.CIBW_ARCHS_MACOS }}
31
- CC : ${{ matrix.env.CC }}
32
- CXX : ${{ matrix.env.CXX }}
33
30
CIBW_CONFIG_SETTINGS : " cmake.verbose=true"
34
31
CIBW_BUILD_VERBOSITY : 1
35
- OMP_DISPLAY_ENV : " true"
36
-
32
+ CMAKE_ARGS : ${{ matrix.env.CMAKE_ARGS }}
37
33
38
34
steps :
39
35
- uses : actions/checkout@v4
48
44
echo "LDFLAGS=$LDFLAGS -L$prefix/lib" >> $GITHUB_ENV
49
45
echo "CXXFLAGS=$CXXFLAGS -I$prefix/include" >> $GITHUB_ENV
50
46
51
- - name : Set OpenMP env for macos arm64
52
- if : matrix.label == 'macos-target-arm64'
53
- run : |
54
- # pkg=$(brew fetch --force --bottle-tag=arm64_ventura [email protected] | grep 'Downloaded to' | cut -d' ' -f3)
55
- # brew install $pkg
56
- wget https://raw.githubusercontent.com/Homebrew/homebrew-core/4da6acd9348624f2957d841a2d8a75018021778e/Formula/lib/libomp.rb
57
- brew install -s ./libomp.rb
58
- prefix=$(brew --prefix libomp)
59
- echo "LDFLAGS=$LDFLAGS -L$prefix/lib -lomp" >> $GITHUB_ENV
60
- # echo "CXXFLAGS=$CXXFLAGS -I$prefix/include -target arm64-apple-macos11 -Xpreprocessor -fopenmp" >> $GITHUB_ENV
61
- echo "CXXFLAGS=$CXXFLAGS -I$prefix/include -target arm64-apple-macos11" >> $GITHUB_ENV
62
- echo "CMAKE_ARGS=$CMAKE_ARGS -DOpenMP_CXX_INCLUDE_DIR=$prefix/include" >> $GITHUB_ENV
63
-
64
47
- name : Build wheels
65
48
66
49
93
76
name : cibw-sdist
94
77
path : dist/*.tar.gz
95
78
96
- test_arm64_wheels :
97
- needs : [build_wheels]
98
- runs-on : macos-14
99
- env :
100
- OMP_DISPLAY_ENV : " true"
101
- strategy :
102
- fail-fast : false
103
- matrix :
104
- python-version : ['3.8', '3.9', '3.10', '3.11', '3.12']
105
-
106
- steps :
107
- - uses : actions/checkout@v4
108
- with :
109
- fetch-depth : 0
110
-
111
- - name : Set up Python ${{ matrix.python-version }}
112
- uses : actions/setup-python@v5
113
- with :
114
- python-version : ${{ matrix.python-version }}
115
-
116
-
117
- - uses : actions/download-artifact@v4
118
- with :
119
- name : cibw-wheels-macos-target-arm64
120
- path : wheelhouse/
121
-
122
- - name : Install arm64 wheels
123
- run : |
124
- pip install -U pip
125
- pip install -f wheelhouse/ nifty-ls[test]
126
- # ensure that the previous install didn't resolve to PyPI
127
- pip install --no-index -f wheelhouse/ nifty-ls[test]
128
-
129
- - name : Run tests
130
- run : |
131
- pytest -s --benchmark-skip tests/
132
-
133
79
upload_all :
134
- needs : [build_wheels, make_sdist, test_arm64_wheels ]
80
+ needs : [build_wheels, make_sdist]
135
81
environment : pypi
136
82
137
83
permissions :
0 commit comments