-
Notifications
You must be signed in to change notification settings - Fork 6
124 lines (107 loc) · 4.28 KB
/
ci_build_wheels.yml
File metadata and controls
124 lines (107 loc) · 4.28 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: CI build wheels
on:
pull_request:
branches:
- master
workflow_dispatch:
env:
container_registry: ghcr.io
CIBW_DEBUG_TRACEBACK: TRUE
jobs:
build_wheels:
name: Build wheels
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# 64-bit manylinux
- os: ubuntu-24.04
system_type: ["manylinux", "_2_28"]
arch: x86_64
py_minors: 8,14
# 64-bit musllinux
- os: ubuntu-24.04
system_type: ["musllinux", "_1_2"]
arch: x86_64
py_minors: 8,14
# 32-bit manylinux
# Python 3.8 does not have numpy2
- os: ubuntu-24.04
system_type: ["manylinux", "2014"]
arch: i686
py_minors: 10,14
# 32-bit musllinux
# Python 3.8 does not have numpy2
# Python 3.12 fails since cibuildwheel still depends on distutils
- os: ubuntu-24.04
system_type: ["musllinux", "_1_2"]
arch: i686
py_minors: 9,11
# 64-bit Windows
- os: windows-2022
system_type: ["win", ""]
arch: amd64
py_minors: 8,14
# 32-bit Windows
# See issue #220: https://github.com/SINTEF/dlite/issues/220
# - os: windows-2019
# system_type: ["win32", ""]
# arch: ""
# py_minors: 8,13
# 64-bit (Intel) macOS
#- os: macos-13
# system_type: ["macosx", ""]
# arch: x86_64
# py_minors: 8,14
# deployment-target: "10.13"
# 64-bit (Apple Silicon) macOS
- os: macos-14
system_type: ["macosx", ""]
arch: arm64
py_minors: 8,14
deployment-target: "11.0"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Python for running cibuildwheel
uses: actions/setup-python@v6
with:
python-version: "3.13.5"
architecture: ${{ matrix.arch == '' && 'x86' || matrix.arch == 'arm64' && 'arm64' || 'x64' }}
# https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64
- name: Install Python3.8 from python.org for macOS compiling
if: matrix.os == 'macos-14'
run: |
url="https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg"
curl $url -o python-3.8.10-macos11.pkg
sudo installer -pkg python-3.8.10-macos11.pkg -target /
- name: Login to GitHub Container Registry
if: startsWith(matrix.os, 'ubuntu')
uses: docker/login-action@v3
with:
registry: ${{ env.container_registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements_wheels.txt
# See pyproject.toml (under python/) for cibuildwheel configuration
- name: Build wheels with cibuildwheel
run: |
python -m cibuildwheel --print-build-identifiers python
python -m cibuildwheel --output-dir wheelhouse python
env:
CIBW_BUILD_VERBOSITY: "3"
CIBW_BEFORE_BUILD: |
python -V
which python
python -m pip --version
python -m pip install -U pip setuptools wheel
CIBW_BUILD: cp3${{ contains(matrix.py_minors, ',') && format('{{{0}}}', matrix.py_minors) || matrix.py_minors }}-${{ matrix.system_type[0] }}${{ matrix.arch != '' && '_' || '' }}${{ matrix.arch }}
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=${{ matrix.deployment-target }}"
CIBW_MANYLINUX_X86_64_IMAGE: ${{ env.container_registry }}/sintef/dlite-python-manylinux${{ matrix.system_type[1] }}_x86_64:latest
CIBW_MANYLINUX_I686_IMAGE: ${{ env.container_registry }}/sintef/dlite-python-manylinux${{ matrix.system_type[1] }}_i686:latest
CIBW_MUSLLINUX_X86_64_IMAGE: ${{ env.container_registry }}/sintef/dlite-python-musllinux${{ matrix.system_type[1] }}_x86_64:latest
CIBW_MUSLLINUX_I686_IMAGE: ${{ env.container_registry }}/sintef/dlite-python-musllinux${{ matrix.system_type[1] }}_i686:latest