-
Notifications
You must be signed in to change notification settings - Fork 8
133 lines (110 loc) · 4.4 KB
/
build-wheels-python-dependent.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
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
125
126
127
128
129
130
131
132
133
name: Build Python version dependent wheels
on:
workflow_call:
jobs:
triage:
name: ${{ matrix.os }} - ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-13 # MacOS x86_64
- macos-latest # MacOS arm64 (M1)
- linux-armv7-self-hosted
- linux-arm64-self-hosted
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
include:
- os: linux-armv7-self-hosted
python-version: '3.9'
CONTAINER: 'python:3.9-bullseye'
- os: linux-armv7-self-hosted
python-version: '3.10'
CONTAINER: 'python:3.10-bullseye'
- os: linux-armv7-self-hosted
python-version: '3.11'
CONTAINER: 'python:3.11-bullseye'
- os: linux-armv7-self-hosted
python-version: '3.12'
CONTAINER: 'python:3.12-bullseye'
- os: linux-armv7-self-hosted
python-version: '3.13'
CONTAINER: 'python:3.13-bullseye'
- os: linux-arm64-self-hosted
python-version: '3.9'
CONTAINER: 'python:3.9-bullseye'
- os: linux-arm64-self-hosted
python-version: '3.10'
CONTAINER: 'python:3.10-bullseye'
- os: linux-arm64-self-hosted
python-version: '3.11'
CONTAINER: 'python:3.11-bullseye'
- os: linux-arm64-self-hosted
python-version: '3.12'
CONTAINER: 'python:3.12-bullseye'
- os: linux-arm64-self-hosted
python-version: '3.13'
CONTAINER: 'python:3.13-bullseye'
# Use python container on ARM
container: ${{ matrix.CONTAINER }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
# Skip setting python on ARM because of missing compatibility: https://github.com/actions/setup-python/issues/108
if: matrix.os != 'linux-armv7-self-hosted' && matrix.os != 'linux-arm64-self-hosted'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get Python version
run: |
python --version
python -m pip install --upgrade pip
- name: Install dependencies
run: python -m pip install -r build_requirements.txt
- name: Install additional OS dependencies - Ubuntu
if: matrix.os == 'ubuntu-latest'
run: os_dependencies/ubuntu.sh
- name: Install additional OS dependencies - MacOS
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
run: os_dependencies/macos.sh
- name: Install additional OS dependencies - Linux ARM7
if: matrix.os == 'linux-armv7-self-hosted' || matrix.os == 'linux-arm64-self-hosted'
run: os_dependencies/linux_arm.sh
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dependent_requirements_${{ matrix.os}}
path: dependent_requirements_${{ matrix.os}}
- name: Print requirements
if: matrix.os != 'windows-latest'
run: cat dependent_requirements_${{ matrix.os}}/dependent_requirements.txt
- name: Print requirements - Windows
if: matrix.os == 'windows-latest'
run: type dependent_requirements_${{ matrix.os}}\\dependent_requirements.txt
- name: Build Python dependent wheels for ${{ matrix.python-version }}
if: matrix.os != 'windows-latest'
run: |
# Rust directory needs to be included for Linux ARM7
if [ "${{ matrix.os }}" = "linux-armv7-self-hosted" ]; then
export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
. $HOME/.cargo/env
fi
python build_wheels_from_file.py dependent_requirements_${{ matrix.os}}
- name: Build Python dependent wheels for ${{ matrix.python-version }} - Windows
if: matrix.os == 'windows-latest'
run: python build_wheels_from_file.py dependent_requirements_${{ matrix.os}}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-download-directory-${{ matrix.os }}-${{ matrix.python-version }}
if-no-files-found: ignore
path: ./downloaded_wheels
retention-days: 1