forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (81 loc) · 2.18 KB
/
sdist.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
name: sdist
on:
push:
branches:
- main
- 1.5.x
- 1.4.x
pull_request:
branches:
- main
- 1.5.x
- 1.4.x
types: [labeled, opened, synchronize, reopened]
paths-ignore:
- "doc/**"
permissions:
contents: read
jobs:
build:
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
concurrency:
# https://gh.neting.ccmunity/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{matrix.python-version}}-sdist
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
# GH 39416
pip install numpy
- name: Build pandas sdist
run: |
pip list
python setup.py sdist --formats=gztar
- name: Upload sdist artifact
uses: actions/upload-artifact@v3
with:
name: ${{matrix.python-version}}-sdist.gz
path: dist/*.gz
- name: Set up Conda
uses: ./.github/actions/setup-conda
with:
environment-file: false
environment-name: pandas-sdist
extra-specs: |
python =${{ matrix.python-version }}
- name: Install pandas from sdist
run: |
pip list
python -m pip install dist/*.gz
- name: Force oldest supported NumPy
run: |
case "${{matrix.python-version}}" in
3.8)
pip install numpy==1.20.3 ;;
3.9)
pip install numpy==1.20.3 ;;
3.10)
pip install numpy==1.21.2 ;;
esac
- name: Import pandas
run: |
cd ..
conda list
python -c "import pandas; pandas.show_versions();"