14
14
- " doc/**"
15
15
16
16
jobs :
17
- build :
18
- if : ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
17
+ sdist :
18
+ # if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
19
19
runs-on : ubuntu-latest
20
20
timeout-minutes : 60
21
21
defaults :
@@ -25,67 +25,76 @@ jobs:
25
25
strategy :
26
26
fail-fast : false
27
27
matrix :
28
- python-version : ["3.8", "3.9", "3.10"]
28
+ # 'numpy-version' is oldest supported NumPy
29
+ include :
30
+ - python-version : " 3.8"
31
+ numpy-version : " 1.18.5"
32
+ - python-version : " 3.9"
33
+ numpy-version : " 1.19.4"
34
+ - python-version : " 3.10"
35
+ numpy-version : " 1.21.3"
36
+
37
+ name : sdist Python ${{ matrix.python-version }} NumPy ${{ matrix.numpy-version }}
38
+
29
39
concurrency :
30
40
# https://github.community/t/concurrecy-not-work-for-push/183068/7
31
- group : ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{matrix.python-version}}-sdist
41
+ group : ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.python-version }}-sdist
32
42
cancel-in-progress : true
33
43
34
44
steps :
35
45
- uses : actions/checkout@v3
36
46
with :
37
47
fetch-depth : 0
38
48
39
- - name : Set up Python
40
- uses : actions/setup-python@v3
49
+ - name : Set up Python ${{ matrix.python-version }} and install dependencies
50
+ uses : ./.github/ actions/setup-python
41
51
with :
42
52
python-version : ${{ matrix.python-version }}
43
53
44
- # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
45
- - name : Install dependencies
46
- run : |
47
- python -m pip install --upgrade pip "setuptools<60.0.0" wheel
48
-
49
- # GH 39416
50
- pip install numpy
51
-
52
54
- name : Build pandas sdist
53
- run : |
54
- pip list
55
- python setup.py sdist --formats=gztar
55
+ run : python setup.py sdist --formats=gztar
56
56
57
57
- name : Upload sdist artifact
58
58
uses : actions/upload-artifact@v3
59
59
with :
60
- name : ${{matrix.python-version}}-sdist.gz
60
+ name : ${{ matrix.python-version }}-sdist.gz
61
61
path : dist/*.gz
62
62
63
- -
uses :
conda-incubator/[email protected]
63
+ - name : Create environment.yml with Python ${{ matrix.python-version }}, NumPy ${{ matrix.numpy-version }}
64
+ run : |
65
+ cat >> tmp_environment.yml <<EOF
66
+ name: pandas-sdist
67
+ channels:
68
+ - conda-forge
69
+ dependencies:
70
+ - python=${{ matrix.python-version }}
71
+ - setuptools<60
72
+ - numpy=${{ matrix.numpy-version }}
73
+ EOF
74
+
75
+ - name : Install Conda enviroment
76
+ uses :
conda-incubator/[email protected]
64
77
with :
65
78
activate-environment : pandas-sdist
79
+ environment-file : tmp_environment.yml
80
+ channel-priority : strict
66
81
channels : conda-forge
67
- python-version : ' ${{ matrix.python-version }}'
82
+ mamba-version : " 0.22"
83
+ use-mamba : true
68
84
69
- # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
70
85
- name : Install pandas from sdist
71
86
run : |
72
- python -m pip install --upgrade "setuptools<60.0.0"
87
+ mamba info
88
+ # Double check that we have the expected NumPy
73
89
pip list
74
- python -m pip install dist/*.gz
75
-
76
- - name : Force oldest supported NumPy
77
- run : |
78
- case "${{matrix.python-version}}" in
79
- 3.8)
80
- pip install numpy==1.18.5 ;;
81
- 3.9)
82
- pip install numpy==1.19.3 ;;
83
- 3.10)
84
- pip install numpy==1.21.2 ;;
85
- esac
90
+ pip list | egrep -i "numpy.+${{ matrix.numpy-version }}"
91
+ time python -m pip install -v dist/*.gz
86
92
87
- - name : Import pandas
93
+ - name : Build Version
88
94
run : |
89
- cd ..
90
- conda list
91
- python -c "import pandas; pandas.show_versions();"
95
+ pushd /tmp
96
+ python -c "import pandas; pandas.show_versions()"
97
+ # Double check that we have the expected Python and NumPy
98
+ python -c "import pandas; pandas.show_versions()" | egrep -i "python.+: ${{ matrix.python-version }}"
99
+ python -c "import pandas; pandas.show_versions()" | egrep -i "numpy.+: ${{ matrix.numpy-version }}"
100
+ popd
0 commit comments