File tree Expand file tree Collapse file tree 2 files changed +88
-0
lines changed Expand file tree Collapse file tree 2 files changed +88
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build CI sdist
2
+
3
+ on :
4
+ # Save CI by only running this on release branches or tags.
5
+ push :
6
+ branches :
7
+ - main
8
+ - v[0-9]+.[0-9]+.x
9
+ tags :
10
+ - v*
11
+ # Also allow running this action on PRs if requested by applying the
12
+ # "Run cibuildsdist" label.
13
+ pull_request :
14
+ types :
15
+ - opened
16
+ - synchronize
17
+ - reopened
18
+ - labeled
19
+
20
+ jobs :
21
+ build_sdist :
22
+ if : |
23
+ github.event_name == 'push' ||
24
+ github.event_name == 'pull_request'
25
+ # && (
26
+ # (
27
+ # github.event.action == 'labeled' &&
28
+ # github.event.label.name == 'Run cibuildsdist'
29
+ # ) ||
30
+ # contains(github.event.pull_request.labels.*.name, 'Run cibuildsdist')
31
+ # )
32
+ name : Build sdist on ${{ matrix.os }}
33
+ runs-on : ${{ matrix.os }}
34
+ strategy :
35
+ matrix :
36
+ os : [ubuntu-20.04]
37
+ python-version : ['3.11.0-alpha - 3.11']
38
+
39
+ steps :
40
+ - uses : actions/checkout@v3
41
+ with :
42
+ fetch-depth : 0
43
+
44
+ - uses : actions/setup-python@v4
45
+ name : Install Python
46
+ with :
47
+ python-version : ${{ matrix.python-version }}
48
+
49
+ - name : Install build
50
+ run : pip install build
51
+
52
+ - name : Build sdist and wheel
53
+ run : python -m build .
54
+
55
+ - name : Install built matplotlib sdist
56
+ run : pip install dist/matplotlib*.tar.gz
57
+
58
+ - name : Check version number is not 0
59
+ run : python ./ci/check_version_number.py
60
+
61
+ - name : Install built matplotlib wheel
62
+ run : pip install dist/matplotlib*.whl
63
+
64
+ - name : Check version number is not 0
65
+ run : python ./ci/check_version_number.py
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+
3
+ """
4
+ Check that the version number of the install Matplotlib does not start with 0
5
+
6
+ To run:
7
+ $ python3 -m build .
8
+ $ pip install dist/matplotlib*.tar.gz for sdist
9
+ $ pip install dist/matplotlib*.whl for wheel
10
+ $ ./ci/check_version_number.py
11
+ """
12
+
13
+ import sys
14
+
15
+ EXIT_SUCCESS = 0
16
+ EXIT_FAILURE = 1
17
+
18
+ import matplotlib
19
+
20
+ print (f"Version { matplotlib .__version__ } installed" )
21
+ if matplotlib .__version__ [0 ] == "0" :
22
+ sys .exit (EXIT_FAILURE )
23
+ sys .exit (EXIT_SUCCESS )
You can’t perform that action at this time.
0 commit comments