-
Notifications
You must be signed in to change notification settings - Fork 4
/
.cirrus.yml
70 lines (63 loc) · 2.83 KB
/
.cirrus.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
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.15.0
cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
path: "wheelhouse/*"
######################################################################
# Build macosx_arm64 natively
######################################################################
cirrus_wheels_macos_arm64_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:14
matrix:
- env:
# building all four wheels in a single task takes ~45 mins
CIBW_BUILD: cp39-* cp310-* cp311-*
# - env:
# # building all four wheels in a single task takes ~45 mins
# # CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
# CIBW_BUILD: cp310-*
env:
PYPI_TOKEN_TEST: ENCRYPTED[3a78537243c7e38cd58853cc4caf77a2e6b2f3a06511952347677300620f6d61f650fd45142d02788b00492b5e6de49f]
PYPI_TOKEN: ENCRYPTED[b27e8f130f21bdd930757077153317e14140a0bac98261a4279e3107ce5c4d859b1f64e304aa52ecbc267727660d354b]
CIBW_ARCHS: arm64
CIBW_ARCHS_MACOS: arm64
PATH: /opt/homebrew/opt/[email protected]/bin:$PATH
CIBW_PRERELEASE_PYTHONS: True
CIBW_ENVIRONMENT: >
MACOSX_DEPLOYMENT_TARGET=12.0
_PYTHON_HOST_PLATFORM="macosx-12.0-arm64"
CIBW_BEFORE_BUILD_MACOS: "bash {project}/tools/wheels/cibw_before_build_macos.sh {project}"
PKG_CONFIG_PATH: /opt/arm64-builds/lib/pkgconfig
# assumes that the cmake config is in /usr/local/lib/cmake
CMAKE_PREFIX_PATH: /opt/arm64-builds/
REPAIR_PATH: /usr/local/gfortran/lib:/opt/arm64-builds/lib
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
DYLD_LIBRARY_PATH=/usr/local/gfortran/lib:/opt/arm64-builds/lib delocate-listdeps {wheel} &&
DYLD_LIBRARY_PATH=/usr/local/gfortran/lib:/opt/arm64-builds/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
install_pre_requirements_script:
- brew install [email protected]
- ln -s python3.10 /opt/homebrew/opt/[email protected]/bin/python
build_script:
- which python
# needed for submodules
- git submodule update --init
- uname -m
- python -c "import platform;print(platform.python_version());print(platform.system());print(platform.machine())"
- clang --version
<<: *BUILD_AND_STORE_WHEELS
upload_pypi_script: |
#!/usr/bin/env bash
echo ${CIRRUS_RELEASE}
echo $CIRRUS_TAG
echo ${CIRRUS_TAG}
# deploy source distribution to PyPI using 'twine'
python -m pip install twine
if [[ "${CIRRUS_RELEASE}" == "" ]]; then
python -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ --username __token__ --password ${PYPI_TOKEN_TEST} wheelhouse/*
else
# echo "would have uploaded"
python -m twine upload --verbose --skip-existing --username __token__ --password ${PYPI_TOKEN} wheelhouse/*
fi