Skip to content

CI: Add ccache #47360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 83 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
a5b2572
BLD: Add meson.build files
lithomas1 Oct 15, 2022
7191763
BLD: Python changes to make meson build work
lithomas1 Oct 15, 2022
65be7cc
Merge branch 'main' of https://github.com/pandas-dev/pandas into add-…
lithomas1 Oct 17, 2022
e5805fc
Revert moving generate_version.py to scripts
lithomas1 Oct 17, 2022
2e89b1f
Update for sas byteswap module
lithomas1 Oct 18, 2022
66346a4
Update
lithomas1 Oct 22, 2022
e267f87
Add pyproject.toml changes
lithomas1 Oct 23, 2022
545a91a
Merge branch 'meson-py-file-changes' into add-meson-build-files
lithomas1 Oct 23, 2022
f85bd93
Revert "Add pyproject.toml changes"
lithomas1 Oct 23, 2022
8896002
Merge branch 'main' into add-meson-build-files
lithomas1 Oct 25, 2022
399a93f
fix style?
lithomas1 Oct 29, 2022
d01fe1a
fix?
lithomas1 Oct 29, 2022
9b64577
Squashed commit of the following:
lithomas1 Nov 9, 2022
0de3320
Merge branch 'main' of https://github.com/pandas-dev/pandas into add-…
lithomas1 Nov 9, 2022
a26c9dd
catchsegv and prepare to disable asserts
lithomas1 Nov 9, 2022
cf24f5d
Go for green
lithomas1 Nov 10, 2022
c5cbcab
green take 2
lithomas1 Nov 11, 2022
f56d1d4
Go for green take 3
lithomas1 Nov 11, 2022
24d07c2
forgot something
lithomas1 Nov 12, 2022
8ceb278
get the code-checks passing too
lithomas1 Nov 12, 2022
7d26fca
Merge branch 'main' of https://github.com/pandas-dev/pandas into add-…
lithomas1 Nov 12, 2022
796d4c4
Fix the darn code checks
lithomas1 Nov 12, 2022
d2764ef
pls work
lithomas1 Nov 12, 2022
ec386f7
maybe get the last failure
lithomas1 Nov 12, 2022
069e76e
pls work
lithomas1 Nov 12, 2022
9068490
maybe maybe maybe???
lithomas1 Nov 12, 2022
6d18625
pls work
lithomas1 Nov 13, 2022
496294c
Respect pyproject.toml
lithomas1 Nov 13, 2022
2e642e8
Maybe bring back cython doctests
lithomas1 Nov 13, 2022
2157f06
Cleanup
lithomas1 Nov 13, 2022
f1555ee
Cleanup
lithomas1 Nov 15, 2022
057ea20
Merge branch 'main' into add-meson-build-files
lithomas1 Nov 15, 2022
beeab2a
Revert changes to 32 bit
lithomas1 Nov 18, 2022
4ecbb41
Fix tests and benchmarks
lithomas1 Nov 18, 2022
e4c5933
Merge branch 'main' of https://github.com/pandas-dev/pandas into add-…
lithomas1 Nov 18, 2022
d00d35a
Fix bad merge
lithomas1 Nov 18, 2022
a823304
Try to fix tests after sync
lithomas1 Nov 19, 2022
073e371
Fix package checks
lithomas1 Nov 19, 2022
55f7ec8
Update
lithomas1 Nov 23, 2022
5c5a0ac
Merge branch 'main' of https://github.com/pandas-dev/pandas into add-…
lithomas1 Nov 23, 2022
5570d9b
update deps
lithomas1 Nov 23, 2022
2b5505e
Update all deps
lithomas1 Nov 23, 2022
a7a2e6f
update the rest
lithomas1 Nov 23, 2022
6ef5a18
Go for green
lithomas1 Nov 23, 2022
9fd9d2b
Merge branch 'main' of https://github.com/pandas-dev/pandas into add-…
lithomas1 Nov 23, 2022
782a8c7
Disable arm64 wheels for now
lithomas1 Nov 23, 2022
3dae633
Merge branch 'main' into add-meson-build-files
lithomas1 Nov 25, 2022
f86b11a
Merge branch 'add-meson-build-files' of github.com:lithomas1/pandas i…
lithomas1 Nov 25, 2022
d7a7bf1
Add docs
lithomas1 Nov 26, 2022
597dd67
update test docs
lithomas1 Nov 26, 2022
aa94fc7
Merge branch 'main' into add-meson-build-files
lithomas1 Nov 29, 2022
77ed403
Update wheels.yml
lithomas1 Nov 29, 2022
a2a8361
Merge branch 'main' into add-meson-build-files
lithomas1 Nov 29, 2022
a01aee8
Bad merge
lithomas1 Nov 29, 2022
b0a2093
Merge branch 'main' into add-meson-build-files
lithomas1 Dec 3, 2022
c2291dc
Fix benchmarks
lithomas1 Dec 3, 2022
6663d31
Update test_rolling.py
lithomas1 Dec 3, 2022
094957d
Update test_rolling.py
lithomas1 Dec 4, 2022
4fe3ec0
Merge branch 'pandas-dev:main' into add-meson-build-files
lithomas1 Dec 7, 2022
0ee732d
Merge branch 'main' into add-meson-build-files
lithomas1 Dec 23, 2022
6291b9b
Adjust for editable support in meson-python
lithomas1 Dec 30, 2022
f6422e5
Merge branch 'main' into add-meson-build-files
lithomas1 Dec 30, 2022
e1f750e
fixes
lithomas1 Dec 30, 2022
f36e014
Merge branch 'add-meson-build-files' of github.com:lithomas1/pandas i…
lithomas1 Dec 30, 2022
6ed4572
Try again
lithomas1 Dec 30, 2022
792c9eb
bring back cov-config
lithomas1 Dec 30, 2022
d64acbf
syntax
lithomas1 Dec 30, 2022
de5c42f
fix arraymanager
lithomas1 Dec 30, 2022
a862508
go for green
lithomas1 Dec 30, 2022
320a64b
Merge branch 'add-meson-build-files' of github.com:lithomas1/pandas i…
lithomas1 Dec 30, 2022
a7f973a
Update docs
lithomas1 Dec 31, 2022
fe904c5
Merge branch 'main' of https://github.com/pandas-dev/pandas into add-…
lithomas1 Jan 3, 2023
1bdedc6
Update contributing_environment.rst
lithomas1 Jan 3, 2023
9e1ccc2
Merge branch 'add-meson-build-files' of github.com:lithomas1/pandas i…
lithomas1 Jan 7, 2023
09c573d
Merge branch 'main' of https://github.com/pandas-dev/pandas into add-…
lithomas1 Jan 7, 2023
9c63bb1
Re-enable more tests
lithomas1 Jan 7, 2023
a3e7ba2
fix code checks
lithomas1 Jan 8, 2023
7a5e1d8
Also install _util.py
lithomas1 Jan 8, 2023
7f6afda
Install in editable mode on Windows as well
lithomas1 Jan 8, 2023
ba7175f
CI: Use ccache
jonashaag Jun 15, 2022
bf153f9
Fixes
jonashaag Jan 8, 2023
a1ec809
Update run_tests.sh
jonashaag Jan 8, 2023
b366563
Update run_tests.sh
jonashaag Jan 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .circleci/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ if pip list | grep -q ^pandas; then
pip uninstall -y pandas || true
fi

echo "Build extensions"
# GH 47305: Parallel build can causes flaky ImportError from pandas/_libs/tslibs
python setup.py build_ext -q -j1

echo "Install pandas"
python -m pip install --no-build-isolation --no-use-pep517 -e .
python -m pip install --no-build-isolation -ve .

echo "done"
22 changes: 22 additions & 0 deletions .github/actions/build-pandas/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# TODO: merge setup-ccache, setup-conda, build-pandas into a single action?
name: Build pandas
description: Rebuilds the C extensions and installs pandas
runs:
using: composite
steps:
- name: Set up Ccache
uses: ./.github/actions/setup-ccache

- name: Build Pandas
if : ${{ runner.os != 'Windows' }}
run: |
python -m pip install -ve . --no-build-isolation
shell: bash -el {0}

- name: Build Pandas (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
call micromamba activate test
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
python -m pip install -ve . --no-build-isolation
shell: cmd /C call {0}
22 changes: 0 additions & 22 deletions .github/actions/build_pandas/action.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/actions/setup-ccache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Setup sccache
runs:
using: composite
steps:
- name: Make cache key
id: cache-key
run: |
key="${{ runner.os }}--${{ runner.arch }}--${{ github.workflow }}"
# Date: Daily invalidation of all ccaches as an extra safety measure.
key="$key--$(/bin/date -u '+%Y%m%d')"
# Python version: Separate caches for each Python version. This reduces the number of cache misses.
key="$key--$(python -V)"
# Cache version: Bump this number to manually invalidate the cache.
key="$key--0"

echo "cache-key=$key" >> $GITHUB_OUTPUT
shell: bash

# On Windows, for some reason the default temporary directory provided to sccache
# may become read-only at some point. Work around by having a private tempdir.
- name: Fix Windows temporary directory
id: mktemp
run: echo "tmpdir=$(cygpath -w $(mktemp -d))" >> $GITHUB_OUTPUT
shell: bash
if: ${{ runner.os == 'Windows' }}

- name: Setup sccache
uses: hendrikmuhs/[email protected]
with:
variant: sccache
key: ${{ steps.cache-key.outputs.cache-key }}
env:
TMP: "${{ steps.mktemp.outputs.tmpdir }}"
11 changes: 3 additions & 8 deletions .github/actions/setup-conda/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ inputs:
environment-file:
description: Conda environment file to use.
default: environment.yml
environment-name:
description: Name to use for the Conda environment
default: test
extra-specs:
description: Extra packages to install
required: false
pyarrow-version:
description: If set, overrides the PyArrow version in the Conda environment to the given string.
required: false
Expand All @@ -19,16 +13,17 @@ runs:
run: |
grep -q ' - pyarrow' ${{ inputs.environment-file }}
sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
echo ::group::Patched environment.yml contents
cat ${{ inputs.environment-file }}
echo ::endgroup::
shell: bash
if: ${{ inputs.pyarrow-version }}

- name: Install ${{ inputs.environment-file }}
uses: mamba-org/provision-with-micromamba@v12
with:
environment-file: ${{ inputs.environment-file }}
environment-name: ${{ inputs.environment-name }}
extra-specs: ${{ inputs.extra-specs }}
environment-name: test
channels: conda-forge
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
condarc-file: ci/condarc.yml
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/32-bit-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ jobs:
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
. ~/virtualenvs/pandas-dev/bin/activate && \
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
pip install "meson[ninja] @ git+https://github.com/mesonbuild/meson.git@master" && \
pip install "git+https://github.com/mesonbuild/meson-python.git@main" && \
python -m pip install versioneer[toml] && \
python -m pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
python setup.py build_ext -q -j1 && \
python -m pip install --no-build-isolation --no-use-pep517 -e . && \
python -m pip list && \
export PANDAS_CI=1 && \
pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml"
python -m pip install --no-build-isolation -ve . && \
python -m pip list && \
pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml --import-mode=importlib"

- name: Publish test results for Python 3.8-32 bit full Linux
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

- name: Build Pandas
id: build
uses: ./.github/actions/build_pandas
uses: ./.github/actions/build-pandas

# The following checks are independent of each other and should still be run if one fails
- name: Check for no warnings when building single-page docs
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:

- name: Build Pandas
id: build
uses: ./.github/actions/build_pandas
uses: ./.github/actions/build-pandas

- name: Run ASV benchmarks
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: ./.github/actions/setup-conda

- name: Build Pandas
uses: ./.github/actions/build_pandas
uses: ./.github/actions/build-pandas

- name: Set up maintainers cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
pyarrow-version: ${{ matrix.os == 'macos-latest' && '9' || '' }}

- name: Build Pandas
uses: ./.github/actions/build_pandas
uses: ./.github/actions/build-pandas

- name: Test
uses: ./.github/actions/run-tests
8 changes: 6 additions & 2 deletions .github/workflows/package-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ jobs:

- name: Install required dependencies
run: |
python -m pip install --upgrade pip setuptools wheel python-dateutil pytz numpy cython
# TODO: Remove when we fully migrate to meson
# since the PEP 517 build will pull build dependencies automatically
python -m pip install --upgrade pip wheel python-dateutil pytz numpy cython
python -m pip install "meson[ninja] @ git+https://github.com/mesonbuild/meson.git@master"
python -m pip install git+https://github.com/mesonbuild/meson-python.git@main
python -m pip install versioneer[toml]
shell: bash -el {0}

- name: Pip install with extra
run: |
python -m pip install -e .[${{ matrix.extra }}] --no-build-isolation
python -m pip install .[${{ matrix.extra }}] -v --no-build-isolation
shell: bash -el {0}
23 changes: 19 additions & 4 deletions .github/workflows/python-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,30 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
python -m pip install git+https://github.com/nedbat/coveragepy.git
python -m pip install python-dateutil pytz cython
# TODO: update when upstream releases fixes
python -m pip install "meson[ninja] @ git+https://github.com/mesonbuild/meson.git@master"
python -m pip install "git+https://github.com/mesonbuild/meson-python.git@main"
python -m pip install hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-cov pytest-asyncio>=0.17
python -m pip install versioneer[toml]
python -m pip install python-dateutil pytz cython hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-cov pytest-asyncio>=0.17
python -m pip list

# GH 47305: Parallel build can cause flaky ImportError from pandas/_libs/tslibs
# Sigh, someone (numpy?) is depending on mingw, which pandas doesn't compile with.
# Also, meson doesn't detect visual c++ unless cl.exe is in path.
# TODO: File a bug with meson-python about this.
- name: Build Pandas
if : ${{ runner.os != 'Windows' }}
run: |
python setup.py build_ext -q -j1
python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index
python3 -m pip install -ve . --no-build-isolation
shell: bash -el {0}

- name: Build Pandas (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
call micromamba activate test
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
python -m pip install -ve . --no-build-isolation
shell: cmd /C call {0}

- name: Build Version
run: |
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,29 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip setuptools wheel build
python -m pip install versioneer[toml]

# GH 39416
pip install numpy

- name: Build pandas sdist
run: |
pip list
python setup.py sdist --formats=gztar
python -m build --sdist

- 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
- name: Set up empty Conda environment
uses: mamba-org/provision-with-micromamba@v12
with:
environment-file: false
environment-name: pandas-sdist
environment-name: sdist
extra-specs: |
python =${{ matrix.python-version }}
channels: conda-forge
condarc-file: ci/condarc.yml

- name: Install pandas from sdist
run: |
Expand Down
106 changes: 54 additions & 52 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,58 +27,60 @@ jobs:
timeout-minutes: 180
strategy:
matrix:
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
#env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
env_file: [actions-38.yaml]
pattern: ["not single_cpu", "single_cpu"]
pyarrow_version: ["7", "8", "9", "10"]
include:
- name: "Downstream Compat"
env_file: actions-38-downstream_compat.yaml
pattern: "not slow and not network and not single_cpu"
pytest_target: "pandas/tests/test_downstream.py"
- name: "Minimum Versions"
env_file: actions-38-minimum_versions.yaml
pattern: "not slow and not network and not single_cpu"
error_on_warnings: "0"
- name: "Locale: it_IT"
env_file: actions-38.yaml
pattern: "not slow and not network and not single_cpu"
extra_apt: "language-pack-it"
# Use the utf8 version as the default, it has no bad side-effect.
lang: "it_IT.utf8"
lc_all: "it_IT.utf8"
# Also install it_IT (its encoding is ISO8859-1) but do not activate it.
# It will be temporarily activated during tests with locale.setlocale
extra_loc: "it_IT"
- name: "Locale: zh_CN"
env_file: actions-38.yaml
pattern: "not slow and not network and not single_cpu"
extra_apt: "language-pack-zh-hans"
# Use the utf8 version as the default, it has no bad side-effect.
lang: "zh_CN.utf8"
lc_all: "zh_CN.utf8"
# Also install zh_CN (its encoding is gb2312) but do not activate it.
# It will be temporarily activated during tests with locale.setlocale
extra_loc: "zh_CN"
- name: "Copy-on-Write"
env_file: actions-310.yaml
pattern: "not slow and not network and not single_cpu"
pandas_copy_on_write: "1"
error_on_warnings: "0"
- name: "Data Manager"
env_file: actions-38.yaml
pattern: "not slow and not network and not single_cpu"
pandas_data_manager: "array"
error_on_warnings: "0"
- name: "Pypy"
env_file: actions-pypy-38.yaml
pattern: "not slow and not network and not single_cpu"
test_args: "--max-worker-restart 0"
error_on_warnings: "0"
- name: "Numpy Dev"
env_file: actions-310-numpydev.yaml
pattern: "not slow and not network and not single_cpu"
test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy"
error_on_warnings: "0"
#pyarrow_version: ["7", "8", "9", "10"]
pyarrow_version: ["10"]
#include:
# - name: "Downstream Compat"
# env_file: actions-38-downstream_compat.yaml
# pattern: "not slow and not network and not single_cpu"
# pytest_target: "pandas/tests/test_downstream.py"
# - name: "Minimum Versions"
# env_file: actions-38-minimum_versions.yaml
# pattern: "not slow and not network and not single_cpu"
# error_on_warnings: "0"
# - name: "Locale: it_IT"
# env_file: actions-38.yaml
# pattern: "not slow and not network and not single_cpu"
# extra_apt: "language-pack-it"
# # Use the utf8 version as the default, it has no bad side-effect.
# lang: "it_IT.utf8"
# lc_all: "it_IT.utf8"
# # Also install it_IT (its encoding is ISO8859-1) but do not activate it.
# # It will be temporarily activated during tests with locale.setlocale
# extra_loc: "it_IT"
# - name: "Locale: zh_CN"
# env_file: actions-38.yaml
# pattern: "not slow and not network and not single_cpu"
# extra_apt: "language-pack-zh-hans"
# # Use the utf8 version as the default, it has no bad side-effect.
# lang: "zh_CN.utf8"
# lc_all: "zh_CN.utf8"
# # Also install zh_CN (its encoding is gb2312) but do not activate it.
# # It will be temporarily activated during tests with locale.setlocale
# extra_loc: "zh_CN"
# - name: "Copy-on-Write"
# env_file: actions-310.yaml
# pattern: "not slow and not network and not single_cpu"
# pandas_copy_on_write: "1"
# error_on_warnings: "0"
# - name: "Data Manager"
# env_file: actions-38.yaml
# pattern: "not slow and not network and not single_cpu"
# pandas_data_manager: "array"
# error_on_warnings: "0"
# - name: "Pypy"
# env_file: actions-pypy-38.yaml
# pattern: "not slow and not network and not single_cpu"
# test_args: "--max-worker-restart 0"
# error_on_warnings: "0"
# - name: "Numpy Dev"
# env_file: actions-310-numpydev.yaml
# pattern: "not slow and not network and not single_cpu"
# test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy"
# error_on_warnings: "0"
exclude:
- env_file: actions-38.yaml
pyarrow_version: "7"
Expand Down Expand Up @@ -173,7 +175,7 @@ jobs:
pyarrow-version: ${{ matrix.pyarrow_version }}

- name: Build Pandas
uses: ./.github/actions/build_pandas
uses: ./.github/actions/build-pandas

- name: Test
uses: ./.github/actions/run-tests
Expand Down
Loading