forked from libAtoms/matscipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
86 lines (75 loc) · 2.99 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# this build script is adapted from scipy
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.11.4
cibuildwheel_script:
- echo "Building wheels for matscipy version $(python discover_version.py)"
- cibuildwheel
- tools/wheels/release-wheels.sh
env:
GITHUB_TOKEN: ENCRYPTED[054da715bf3596559d27a6c74738981a8e878dbbc0dd896cb57a0a758c6a57143fca006376d0eb58d777c25e43ed91cb]
TWINE_USERNAME: __token__
TWINE_PASSWORD: ENCRYPTED[13d27e71fe29d4d18d53c7b9dffa4472b8abcd094933530310e8dfe4fae4b8b576d1d7c1a7965918e1c4cff5ad4dc326]
wheels_artifacts:
path: "wheelhouse/*"
######################################################################
# Build linux_aarch64 natively
######################################################################
cirrus_wheels_linux_aarch64_task:
compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder-arm64
architecture: arm64
platform: linux
cpu: 4
memory: 8G
matrix:
- env:
CIBW_BUILD: cp38-* cp39-*
- env:
CIBW_BUILD: cp310-* cp311-*
build_script: |
apt install -y python3-venv python-is-python3
which python
echo $CIRRUS_CHANGE_MESSAGE
# needed for discover_version.py
git fetch --all
# needed for submodules
git submodule update --init
<<: *BUILD_AND_STORE_WHEELS
######################################################################
# Build macosx_arm64 natively
######################################################################
cirrus_wheels_macos_arm64_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:13.3.1
matrix:
- env:
CIBW_BUILD: cp38-*
CIBW_BEFORE_ALL: bash tools/wheels/cibw_before_all_cp38_macosx_arm64.sh
- env:
CIBW_BUILD: cp39-* cp310-* cp311-*
env:
PATH: /opt/homebrew/opt/[email protected]/bin:$PATH
CIBW_ENVIRONMENT: MACOSX_DEPLOYMENT_TARGET=12.0 _PYTHON_HOST_PLATFORM="macosx-12.0-arm64"
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}
CIBW_TEST_COMMAND: python {project}/tests/test_ffi.py
install_pre_requirements_script:
- brew install [email protected]
- ln -s python3 /opt/homebrew/opt/[email protected]/bin/python
build_script:
- which python
# needed for discover_version.py
- git fetch --all
# 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