Skip to content

Commit

Permalink
Backport of CI/Build related PRs on 1.4.x (2) (#46572)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins committed Mar 30, 2022
1 parent 749872f commit 89baca7
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 46 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build_pandas/action.yml
Expand Up @@ -8,10 +8,10 @@ runs:
run: |
conda info
conda list
shell: bash -l {0}
shell: bash -el {0}

- name: Build Pandas
run: |
python setup.py build_ext -j 2
python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index
shell: bash -l {0}
shell: bash -el {0}
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Expand Up @@ -5,8 +5,8 @@ runs:
steps:
- name: Setting conda path
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
shell: bash -l {0}
shell: bash -el {0}

- name: Setup environment and build pandas
run: ci/setup_env.sh
shell: bash -l {0}
shell: bash -el {0}
10 changes: 5 additions & 5 deletions .github/workflows/asv-bot.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
shell: bash -el {0}

concurrency:
# Set concurrency to prevent abuse(full runs are ~5.5 hours !!!)
Expand All @@ -29,19 +29,19 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache conda
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}

# Although asv sets up its own env, deps are still needed
# during discovery process
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: pandas-dev
channel-priority: strict
Expand All @@ -65,7 +65,7 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
echo "REGEX=$REGEX" >> $GITHUB_ENV
- uses: actions/github-script@v5
- uses: actions/github-script@v6
env:
BENCH_OUTPUT: ${{env.BENCH_OUTPUT}}
REGEX: ${{env.REGEX}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/autoupdate-pre-commit-config.yml
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
- name: Cache multiple paths
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cache/pre-commit
Expand Down
48 changes: 36 additions & 12 deletions .github/workflows/code-checks.yml
Expand Up @@ -24,10 +24,10 @@ jobs:
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.9.7'

Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
shell: bash -el {0}

concurrency:
# https://github.community/t/concurrecy-not-work-for-push/183068/7
Expand All @@ -48,17 +48,17 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache conda
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v2.1.1
with:
mamba-version: "*"
channels: conda-forge
Expand All @@ -68,7 +68,7 @@ jobs:
use-only-tar-bz2: true

- name: Install node.js (for pyright)
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "16"

Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
shell: bash -el {0}

concurrency:
# https://github.community/t/concurrecy-not-work-for-push/183068/7
Expand All @@ -114,17 +114,17 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache conda
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v2.1.1
with:
mamba-version: "*"
channels: conda-forge
Expand All @@ -151,8 +151,32 @@ jobs:
if: ${{ steps.build.outcome == 'success' }}

- name: Publish benchmarks artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Benchmarks log
path: asv_bench/benchmarks.log
if: failure()

build_docker_dev_environment:
name: Build Docker Dev Environment
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}

concurrency:
# https://github.community/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-build_docker_dev_environment
cancel-in-progress: true

steps:
- name: Clean up dangling images
run: docker image prune -f

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build image
run: docker build --pull --no-cache --tag pandas-dev-env .
6 changes: 3 additions & 3 deletions .github/workflows/comment_bot.yml
Expand Up @@ -12,18 +12,18 @@ jobs:
if: startsWith(github.event.comment.body, '@github-actions pre-commit')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache multiple paths
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cache/pre-commit
~/.cache/pip
key: pre-commit-dispatched-${{ runner.os }}-build
- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install-pre-commit
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docbuild-and-upload.yml
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
run: mv doc/build/html web/build/docs

- name: Save website as an artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: website
path: web/build
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/posix.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
shell: bash -el {0}
timeout-minutes: 120
strategy:
matrix:
Expand Down Expand Up @@ -121,12 +121,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache conda
uses: actions/cache@v2
uses: actions/cache@v3
env:
CACHE_NUMBER: 0
with:
Expand All @@ -138,7 +138,7 @@ jobs:
# xsel for clipboard tests
run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 xsel ${{ env.EXTRA_APT }}

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v2.1.1
with:
mamba-version: "*"
channels: conda-forge
Expand All @@ -153,13 +153,12 @@ jobs:
if: ${{ matrix.pyarrow_version }}

- name: Setup PyPy
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: "pypy-3.8"
if: ${{ env.IS_PYPY == 'true' }}

- name: Setup PyPy dependencies
shell: bash
run: |
# TODO: re-enable cov, its slowing the tests down though
pip install Cython numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 pytest-asyncio>=0.17 hypothesis>=5.5.3
Expand All @@ -178,7 +177,7 @@ jobs:
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd

- name: Publish test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Test results
path: test-data.xml
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/python-dev.yml
Expand Up @@ -45,18 +45,18 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python Dev Version
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.11-dev'

# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
- name: Install dependencies
shell: bash
shell: bash -el {0}
run: |
python -m pip install --upgrade pip "setuptools<60.0.0" wheel
pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
Expand All @@ -74,12 +74,12 @@ jobs:
python -c "import pandas; pandas.show_versions();"
- name: Test with pytest
shell: bash
shell: bash -el {0}
run: |
ci/run_tests.sh
- name: Publish test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Test results
path: test-data.xml
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/sdist.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
timeout-minutes: 60
defaults:
run:
shell: bash -l {0}
shell: bash -el {0}

strategy:
fail-fast: false
Expand All @@ -30,12 +30,12 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -52,7 +52,13 @@ jobs:
pip list
python setup.py sdist --formats=gztar
- uses: conda-incubator/setup-miniconda@v2
- name: Upload sdist artifact
uses: actions/upload-artifact@v3
with:
name: ${{matrix.python-version}}-sdist.gz
path: dist/*.gz

- uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: pandas-sdist
channels: conda-forge
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
@@ -1,4 +1,4 @@
FROM quay.io/condaforge/miniforge3
FROM quay.io/condaforge/miniforge3:4.11.0-0

# if you forked pandas, you can pass in your own GitHub username to use your fork
# i.e. gh_username=myname
Expand Down Expand Up @@ -45,4 +45,4 @@ RUN . /opt/conda/etc/profile.d/conda.sh \
&& cd "$pandas_home" \
&& export \
&& python setup.py build_ext -j 4 \
&& python -m pip install -e .
&& python -m pip install --no-build-isolation -e .

0 comments on commit 89baca7

Please sign in to comment.