-
Notifications
You must be signed in to change notification settings - Fork 335
152 lines (133 loc) · 4.18 KB
/
llvmlite_win-64_wheel_builder.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: llvmlite_win-64_wheel_builder
on:
pull_request:
paths:
- .github/workflows/llvmlite_win-64_wheel_builder.yml
workflow_dispatch:
inputs:
llvmdev_run_id:
description: 'llvmdev workflow run ID (optional)'
required: false
type: string
# Add concurrency control
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
LOCAL_LLVMDEV_ARTIFACT_PATH: D:/a/llvmlite/llvmlite/llvmdev_conda_packages
FALLBACK_LLVMDEV_VERSION: "15"
CONDA_CHANNEL_NUMBA: numba/label/win64_wheel
VALIDATION_PYTHON_VERSION: "3.12"
ARTIFACT_RETENTION_DAYS: 7
jobs:
win-64-build:
name: win-64-build
runs-on: windows-2019
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
fail-fast: false
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
conda-remove-defaults: true
auto-update-conda: true
auto-activate-base: true
- name: Download llvmdev Artifact
if: ${{ inputs.llvmdev_run_id != '' }}
uses: actions/download-artifact@v4
with:
name: llvmdev_win-64
path: llvmdev_conda_packages
run-id: ${{ inputs.llvmdev_run_id }}
repository: ${{ github.repository }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install build dependencies
run: |
set -x
if [ "${{ inputs.llvmdev_run_id }}" != "" ]; then
CHAN="file:///${{ env.LOCAL_LLVMDEV_ARTIFACT_PATH }}"
else
CHAN="${{ env.CONDA_CHANNEL_NUMBA }}"
fi
conda install -c "$CHAN" llvmdev=${{ env.FALLBACK_LLVMDEV_VERSION }} cmake libxml2 python-build
- name: Build wheel
run: python -m build
- name: Upload llvmlite wheel
uses: actions/upload-artifact@v4
with:
name: llvmlite-win-64-py${{ matrix.python-version }}
path: dist/*.whl
compression-level: 0
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}
if-no-files-found: error
win-64-validate:
name: win-64-validate
needs: win-64-build
runs-on: windows-2019
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
fail-fast: false
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ env.VALIDATION_PYTHON_VERSION }}
conda-remove-defaults: true
auto-update-conda: true
auto-activate-base: true
- name: Install validation dependencies
run: conda install -c defaults py-lief wheel twine keyring rfc3986
- name: Download llvmlite wheels
uses: actions/download-artifact@v4
with:
name: llvmlite-win-64-py${{ matrix.python-version }}
path: dist
- name: Validate wheels
run: |
cd dist
for WHL_FILE in *.whl; do
wheel unpack "$WHL_FILE"
python "$GITHUB_WORKSPACE"/buildscripts/github/validate_win64_wheel.py llvmlite/binding/llvmlite.dll
twine check "$WHL_FILE"
done
win-64-test:
name: win-64-test
needs: win-64-validate
runs-on: windows-2019
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
fail-fast: false
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Download llvmlite wheel
uses: actions/download-artifact@v4
with:
name: llvmlite-win-64-py${{ matrix.python-version }}
path: dist
- name: Install and test
run: |
pip install dist/*.whl
python -m llvmlite.tests