|
| 1 | +name: sdist |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - 2.0.x |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + - 2.0.x |
| 12 | + types: [labeled, opened, synchronize, reopened] |
| 13 | + paths-ignore: |
| 14 | + - "doc/**" |
| 15 | + - "web/**" |
| 16 | + |
| 17 | +permissions: |
| 18 | + contents: read |
| 19 | + |
| 20 | +jobs: |
| 21 | + build: |
| 22 | + if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}} |
| 23 | + runs-on: ubuntu-22.04 |
| 24 | + timeout-minutes: 60 |
| 25 | + defaults: |
| 26 | + run: |
| 27 | + shell: bash -el {0} |
| 28 | + |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + matrix: |
| 32 | + python-version: ["3.9", "3.10", "3.11"] |
| 33 | + concurrency: |
| 34 | + # https://github.community/t/concurrecy-not-work-for-push/183068/7 |
| 35 | + group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{matrix.python-version}}-sdist |
| 36 | + cancel-in-progress: true |
| 37 | + |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v3 |
| 40 | + with: |
| 41 | + fetch-depth: 0 |
| 42 | + |
| 43 | + - name: Set up Python |
| 44 | + uses: actions/setup-python@v4 |
| 45 | + with: |
| 46 | + python-version: ${{ matrix.python-version }} |
| 47 | + |
| 48 | + - name: Install dependencies |
| 49 | + run: | |
| 50 | + python -m pip install --upgrade pip setuptools wheel |
| 51 | + python -m pip install versioneer[toml] |
| 52 | +
|
| 53 | + # GH 39416 |
| 54 | + pip install numpy |
| 55 | +
|
| 56 | + - name: Build pandas sdist |
| 57 | + run: | |
| 58 | + pip list |
| 59 | + python setup.py sdist --formats=gztar |
| 60 | +
|
| 61 | + - name: Upload sdist artifact |
| 62 | + uses: actions/upload-artifact@v3 |
| 63 | + with: |
| 64 | + name: ${{matrix.python-version}}-sdist.gz |
| 65 | + path: dist/*.gz |
| 66 | + |
| 67 | + - name: Set up Conda |
| 68 | + uses: ./.github/actions/setup-conda |
| 69 | + with: |
| 70 | + environment-file: false |
| 71 | + environment-name: pandas-sdist |
| 72 | + extra-specs: | |
| 73 | + python =${{ matrix.python-version }} |
| 74 | +
|
| 75 | + - name: Install pandas from sdist |
| 76 | + run: | |
| 77 | + pip list |
| 78 | + python -m pip install dist/*.gz |
| 79 | +
|
| 80 | + - name: Force oldest supported NumPy |
| 81 | + run: | |
| 82 | + case "${{matrix.python-version}}" in |
| 83 | + 3.9) |
| 84 | + pip install numpy==1.21.6 ;; |
| 85 | + 3.10) |
| 86 | + pip install numpy==1.21.6 ;; |
| 87 | + 3.11) |
| 88 | + pip install numpy==1.23.2 ;; |
| 89 | + esac |
| 90 | +
|
| 91 | + - name: Import pandas |
| 92 | + run: | |
| 93 | + cd .. |
| 94 | + python -c "import pandas; pandas.show_versions();" |
0 commit comments