-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (53 loc) · 1.7 KB
/
buildwheels_macos.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
name: Build python wheels - macos
on:
workflow_dispatch
jobs:
build-wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13]
steps:
- uses: actions/checkout@v2
- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: dist
env:
CIBW_BUILD: cp312-macosx_x86_64
CIBW_SKIP: "*win32 *i686 *musllinux*"
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL_LINUX: "yum install -y openblas-devel"
CIBW_BEFORE_ALL_MACOS: "brew install libomp"
CIBW_CONFIG_SETTINGS: "cmake.define.ENABLE_PYTHON_EMBED=OFF"
CIBW_CONFIG_SETTINGS_MACOS: "cmake.define.CMAKE_Fortran_COMPILER=gfortran-12 cmake.define.CMAKE_OSX_DEPLOYMENT_TARGET=10.13"
CIBW_ENVIRONMENT_MACOS: "OpenMP_ROOT=$(brew --prefix)/opt/libomp"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: >
cd {package} &&
pytest python/test
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
pypi-publish:
runs-on: ubuntu-latest
needs:
- build-wheels
permissions:
id-token: write
# Dedicated environments with protections for publishing are strongly recommended.
environment:
name: pypi
url: https://pypi.org/project/pygenten/
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true