-
Notifications
You must be signed in to change notification settings - Fork 313
91 lines (89 loc) · 3.24 KB
/
build.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
name: build
on:
pull_request:
push:
branches:
- master
release:
types:
- released
workflow_dispatch:
jobs:
cmake:
strategy:
matrix:
runs-on:
- ubuntu-latest
# macos-13 is an intel runner, macos-14 is apple silicon
- macos-13
- macos-latest
fail-fast: false
runs-on: ${{ matrix.runs-on }}
steps:
- uses: zacharyburnett/setup-abseil-cpp@de39f445295c887839e30c864ffbbb1c0231bc83 # 1.0.5
with:
cmake-build-args: "-DCMAKE_CXX_STANDARD=17 -DABSL_PROPAGATE_CXX_STD=ON -DABSL_ENABLE_INSTALL=ON -DBUILD_TESTING=off -DCMAKE_POSITION_INDEPENDENT_CODE=ON"
abseil-version: "20240722.0"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: mkdir build
- run: cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_PREFIX_PATH=/usr/local/ -DBUILD_TESTS=OFF ..
working-directory: build/
- run: sudo cmake --build . --parallel --target=install
working-directory: build/
python-wheels:
strategy:
matrix:
runs-on:
- ubuntu-latest
# macos-13 is an intel runner, macos-14 is apple silicon
- macos-13
- macos-latest
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
exclude:
# importing the package from the wheel instantly segfaults on macOS Python <= 3.12
- runs-on: macos-latest
python-version: "3.8"
- runs-on: macos-latest
python-version: "3.9"
- runs-on: macos-latest
python-version: "3.10"
- runs-on: macos-latest
python-version: "3.11"
- runs-on: macos-latest
python-version: "3.12"
- runs-on: macos-13
python-version: "3.8"
- runs-on: macos-13
python-version: "3.9"
- runs-on: macos-13
python-version: "3.10"
- runs-on: macos-13
python-version: "3.11"
- runs-on: macos-13
python-version: "3.12"
fail-fast: false
runs-on: ${{ matrix.runs-on }}
steps:
- uses: zacharyburnett/setup-abseil-cpp@de39f445295c887839e30c864ffbbb1c0231bc83 # 1.0.5
with:
cmake-build-args: "-DCMAKE_CXX_STANDARD=17 -DABSL_PROPAGATE_CXX_STD=ON -DABSL_ENABLE_INSTALL=ON -DBUILD_TESTING=off -DCMAKE_POSITION_INDEPENDENT_CODE=ON"
abseil-version: "20240722.0"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python-version }}
- run: pip install build repairwheel
- run: python -m build -w
- run: repairwheel ./dist/*.whl -o ./dist/delocated/
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: s2geometry-py${{ matrix.python-version }}-${{ runner.os }}-${{ runner.arch }}
path: ./dist/delocated/*.whl
- if: (github.event_name == 'release') && (github.event.action == 'released')
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2