This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
forked from matplotlib/matplotlib
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.61 KB
/
cibuildsdist.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
name: Build CI sdist and wheel
on:
# Save CI by only running this on release branches or tags.
push:
branches:
- main
- v[0-9]+.[0-9]+.x
tags:
- v*
# Also allow running this action on PRs if requested by applying the
# "Run cibuildwheel" label.
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
jobs:
build_sdist:
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request' && (
(
github.event.action == 'labeled' &&
github.event.label.name == 'Run cibuildwheel'
) ||
contains(github.event.pull_request.labels.*.name, 'Run cibuildwheel')
)
name: Build sdist and wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8', '3.9', '3.10', '3.11.0-alpha - 3.11']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: ${{ matrix.python-version }}
- name: Install build
run: pip install build
- name: Build sdist and wheel
run: python -m build .
- name: Install built matplotlib sdist
run: pip install dist/matplotlib*.tar.gz
- name: Check version number is not 0
run: python ./ci/check_version_number.py
- name: Install built matplotlib wheel
run: pip install dist/matplotlib*.whl --force-reinstall
- name: Check version number is not 0
run: python ./ci/check_version_number.py