Skip to content

Commit e82f158

Browse files
committed
Try sccache (Windows support)
1 parent b01c374 commit e82f158

File tree

9 files changed

+55
-61
lines changed

9 files changed

+55
-61
lines changed

.github/actions/build-pandas/action.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,15 @@ runs:
4040
uses: ./.github/actions/setup-ccache
4141
with:
4242
extra-cache-key: ${{ steps.get-python-version.outputs.version }}
43-
if: ${{ runner.os != 'Windows' }}
4443

4544
- name: Build Pandas
4645
shell: bash /tmp/_build_pandas_shell {0}
4746
run: |
48-
if [ -z "$CC_FOR_BUILD" ]; then
49-
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
50-
else
51-
# "build_ext" uses '$CC.split()[0]' as its linker, which isn't what
52-
# we want if '$CC.split()[0]' is "ccache".
53-
echo -e '#!/bin/bash -eu\n if which "$1"; then exec ccache "$@"; else exec ccache "$CC" "$@"; fi' >> /tmp/ccache-wrapper
54-
chmod +x /tmp/ccache-wrapper
55-
export CC="/tmp/ccache-wrapper $CC"
56-
fi
47+
# "build_ext" uses '$CC.split()[0]' as its linker, which isn't what
48+
# we want if '$CC.split()[0]' is "ccache".
49+
echo -e '#!/bin/bash -eu\n if which "$1"; then exec ccache "$@"; else exec ccache "$CC" "$@"; fi' >> /tmp/ccache-wrapper
50+
chmod +x /tmp/ccache-wrapper
51+
export CC="/tmp/ccache-wrapper $CC"
5752
time python setup.py build_ext -vv -j 2
5853
time python -m pip install -vv -e . --no-build-isolation --no-use-pep517 --no-index
5954

.github/actions/setup-ccache/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ runs:
1212
shell: bash
1313

1414
- name: Setup ccache
15-
uses: hendrikmuhs/ccache-action@2181be813387616fc2b8dca72d3ff8b912b25f73
15+
uses: jonashaag/ccache-action@sccache-2
1616
with:
17+
sccache: true
1718
key: ${{ runner.os }}--${{ runner.arch }}--${{ github.workflow }}--${{ steps.get-date.outputs.today }}--${{ inputs.extra-cache-key }}

.github/actions/setup/action.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ runs:
2525
path: ~/conda_pkgs_dir
2626
key: conda-${{ runner.os }}-${{ runner.arch }}-${{ inputs.environment-file }}-${{ steps.get-date.outputs.today }}
2727

28-
- uses: conda-incubator/setup-miniconda@v2
28+
- name: Setup Mambaforge and install ${{ inputs.environment-file }} (Python ${{ inputs.python-version }})
29+
uses: conda-incubator/setup-miniconda@v2
2930
with:
3031
mamba-version: "0.20"
3132
use-mamba: true
@@ -37,14 +38,14 @@ runs:
3738
use-only-tar-bz2: true
3839
if: ${{ inputs.is-pypy == 'false' }} # No pypy3.8 support
3940

40-
- name: Pin setuptools
41+
- name: Pin setuptools (GH#44980)
4142
run: mamba install -n ${{ inputs.activate-environment }} 'setuptools<60.0.0'
4243
shell: bash
4344
if: ${{ inputs.is-pypy == 'false' }} # No pypy3.8 support
4445

45-
- name: Upgrade Arrow version
46-
run: mamba install -n pandas-dev -c conda-forge --no-update-deps pyarrow=${{ matrix.pyarrow-version }}
47-
if: ${{ matrix.pyarrow-version }}
46+
- name: Upgrade Arrow to ${{ inputs.pyarrow-version }}
47+
run: mamba install -n pandas-dev -c conda-forge --no-update-deps pyarrow=${{ inputs.pyarrow-version }}
48+
if: ${{ inputs.pyarrow-version }}
4849

4950
- name: Setup PyPy
5051
uses: actions/setup-python@v2
@@ -54,7 +55,6 @@ runs:
5455

5556
- name: Setup PyPy dependencies
5657
# TODO: re-enable cov, its slowing the tests down though
57-
# TODO: Unpin Cython, the new Cython 0.29.26 is causing compilation errors
58-
run: pip install Cython==0.29.25 numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3
58+
run: pip install Cython numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3
5959
shell: bash
6060
if: ${{ inputs.is-pypy == 'true' }}

.github/workflows/code-checks.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Code Checks
33
on:
44
push:
55
branches:
6-
- main
7-
- 1.4.x
6+
- mainskip
7+
- 1.4.xskip
88
pull_request:
99
branches:
10-
- main
11-
- 1.4.x
10+
- mainskip
11+
- 1.4.xskip
1212

1313
env:
1414
PANDAS_CI: 1

.github/workflows/datamanager.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Data Manager
33
on:
44
push:
55
branches:
6-
- main
7-
- 1.4.x
6+
- mainskip
7+
- 1.4.xskip
88
pull_request:
99
branches:
10-
- main
11-
- 1.4.x
10+
- mainskip
11+
- 1.4.xskip
1212
paths-ignore:
1313
- "doc/**"
1414

.github/workflows/docbuild-and-upload.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Doc Build and Upload
33
on:
44
push:
55
branches:
6-
- main
7-
- 1.4.x
6+
- mainskip
7+
- 1.4.xskip
88
pull_request:
99
branches:
10-
- main
11-
- 1.4.x
10+
- mainskip
11+
- 1.4.xskip
1212

1313
env:
1414
PANDAS_CI: 1

.github/workflows/posix.yml

+26-27
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,30 @@ jobs:
2929
pattern: ["not single_cpu", "single_cpu"]
3030
# Don't test pyarrow v2/3: Causes timeouts in read_csv engine
3131
# even if tests are skipped/xfailed
32-
pyarrow_version: ["5", "6", "7"]
33-
include:
34-
- env_file: actions-38-downstream_compat.yaml
35-
pattern: "not slow and not network and not single_cpu"
36-
pytest_target: "pandas/tests/test_downstream.py"
37-
- env_file: actions-38-minimum_versions.yaml
38-
pattern: "not slow and not network and not single_cpu"
39-
- env_file: actions-38.yaml
40-
pattern: "not slow and not network and not single_cpu"
41-
extra_apt: "language-pack-it"
42-
lang: "it_IT.utf8"
43-
lc_all: "it_IT.utf8"
44-
- env_file: actions-38.yaml
45-
pattern: "not slow and not network and not single_cpu"
46-
extra_apt: "language-pack-zh-hans"
47-
lang: "zh_CN.utf8"
48-
lc_all: "zh_CN.utf8"
49-
- env_file: actions-pypy-38.yaml
50-
pattern: "not slow and not network and not single_cpu"
51-
test_args: "--max-worker-restart 0"
52-
- env_file: actions-310-numpydev.yaml
53-
pattern: "not slow and not network and not single_cpu"
54-
pandas_testing_mode: "deprecate"
55-
test_args: "-W error"
32+
pyarrow_version: ["5"] #, "6", "7"]
33+
# include:
34+
# - env_file: actions-38-downstream_compat.yaml
35+
# pattern: "not slow and not network and not single_cpu"
36+
# pytest_target: "pandas/tests/test_downstream.py"
37+
# - env_file: actions-38-minimum_versions.yaml
38+
# pattern: "not slow and not network and not single_cpu"
39+
# - env_file: actions-38.yaml
40+
# pattern: "not slow and not network and not single_cpu"
41+
# extra_apt: "language-pack-it"
42+
# lang: "it_IT.utf8"
43+
# lc_all: "it_IT.utf8"
44+
# - env_file: actions-38.yaml
45+
# pattern: "not slow and not network and not single_cpu"
46+
# extra_apt: "language-pack-zh-hans"
47+
# lang: "zh_CN.utf8"
48+
# lc_all: "zh_CN.utf8"
49+
# - env_file: actions-pypy-38.yaml
50+
# pattern: "not slow and not network and not single_cpu"
51+
# test_args: "--max-worker-restart 0"
52+
# - env_file: actions-310-numpydev.yaml
53+
# pattern: "not slow and not network and not single_cpu"
54+
# pandas_testing_mode: "deprecate"
55+
# test_args: "-W error"
5656
fail-fast: false
5757
env:
5858
ENV_FILE: ci/deps/${{ matrix.env_file }}
@@ -118,16 +118,15 @@ jobs:
118118
# xsel for clipboard tests
119119
run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 xsel ${{ env.EXTRA_APT }}
120120

121-
- name: Set up Conda
121+
- name: Set up Conda (${{ matrix.env_file }}, Arrow ${{ matrix.pyarrow_version}})
122122
uses: ./.github/actions/setup
123123
with:
124124
environment-file: ${{ env.ENV_FILE }}
125+
pyarrow-version: ${{ matrix.pyarrow_version }}
125126
is-pypy: ${{ env.IS_PYPY }}
126127

127128
- name: Build pandas
128129
uses: ./.github/actions/build-pandas
129-
with:
130-
pyarrow-version: ${{ matrix.pyarrow_version }}
131130

132131
- name: Test
133132
run: ci/run_tests.sh

.github/workflows/python-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ env:
2929

3030
jobs:
3131
build:
32-
if: false # Comment this line out to "unfreeze"
32+
#if: false # Comment this line out to "unfreeze"
3333
runs-on: ${{ matrix.os }}
3434
strategy:
3535
fail-fast: false

.github/workflows/sdist.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ["3.8", "3.9", "3.10"]
26+
python-version: ["3.8"] #, "3.9", "3.10"]
2727
concurrency:
2828
# https://github.community/t/concurrecy-not-work-for-push/183068/7
2929
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{matrix.python-version}}-sdist
@@ -69,8 +69,7 @@ jobs:
6969
run: |
7070
python -m pip install --upgrade "setuptools<60.0.0"
7171
pip list
72-
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
73-
time python -m pip install -vv dist/*.gz
72+
time CC="sccache $CC" python -m pip install -vv dist/*.gz
7473
7574
- name: Force oldest supported NumPy
7675
run: |

0 commit comments

Comments
 (0)