-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (105 loc) · 4.05 KB
/
Copy pathbuild-matplotlib.yml
File metadata and controls
123 lines (105 loc) · 4.05 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
---
name: Build matplotlib wheels (riscv64)
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
permissions: {}
jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-24.04-riscv
permissions:
contents: read
outputs:
SDIST_NAME: ${{ steps.sdist.outputs.SDIST_NAME }}
steps:
- name: Checkout python-wheels
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Checkout matplotlib
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: matplotlib/matplotlib
path: upstream
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Install Python
with:
python-version: '3.12'
activate-environment: true
enable-cache: false
# Something changed somewhere that prevents the downloaded-at-build-time
# licenses from being included in built wheels, so pre-download them so
# that they exist before the build and are included.
- name: Pre-download bundled licenses
working-directory: upstream
run: >
curl -Lo LICENSE/LICENSE_QHULL
https://github.com/qhull/qhull/raw/2020.2/COPYING.txt
- name: Install dependencies
run: python -m pip install build twine
- name: Build sdist
id: sdist
working-directory: upstream
run: |
python -m build --sdist
python ci/export_sdist_name.py
- name: Check README rendering for PyPI
working-directory: upstream
run: twine check dist/*
- name: Upload sdist result
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: cibw-sdist
path: upstream/dist/*.tar.gz
if-no-files-found: error
build_wheels:
needs: build_sdist
name: Build wheels on ubuntu-24.04-riscv for riscv64
permissions:
contents: read
runs-on: ubuntu-24.04-riscv
steps:
- name: Checkout python-wheels
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Download sdist
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: cibw-sdist
path: dist/
- name: Build wheels for CPython 3.14
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
with:
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
env:
CIBW_BUILD: "cp314-* cp314t-*"
CIBW_ARCHS: "riscv64"
CIBW_ENVIRONMENT: 'PIP_PREFER_BINARY=1 PIP_EXTRA_INDEX_URL=https://gitlab.com/api/v4/projects/riseproject%2Fpython%2Fwheel_builder/packages/pypi/simple'
- name: Build wheels for CPython 3.13
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
with:
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
env:
CIBW_BUILD: "cp313-*"
CIBW_ARCHS: "riscv64"
CIBW_ENVIRONMENT: 'PIP_PREFER_BINARY=1 PIP_EXTRA_INDEX_URL=https://gitlab.com/api/v4/projects/riseproject%2Fpython%2Fwheel_builder/packages/pypi/simple'
- name: Build wheels for CPython 3.12
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
with:
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
env:
CIBW_BUILD: "cp312-*"
CIBW_ARCHS: "riscv64"
CIBW_ENVIRONMENT: 'PIP_PREFER_BINARY=1 PIP_EXTRA_INDEX_URL=https://gitlab.com/api/v4/projects/riseproject%2Fpython%2Fwheel_builder/packages/pypi/simple'
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: cibw-wheels-${{ runner.os }}-riscv64
path: ./wheelhouse/*.whl
if-no-files-found: error