Skip to content

Cache Conda env #47454

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

Merged
merged 6 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/actions/build_pandas/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ runs:

- name: Environment Detail
run: |
conda info
conda list
micromamba info
micromamba list
shell: bash -el {0}

- name: Build Pandas
Expand Down
17 changes: 8 additions & 9 deletions .github/actions/setup-conda/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ inputs:
environment-name:
description: Name to use for the Conda environment
default: test
python-version:
description: Python version to install
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.
Expand All @@ -24,14 +24,13 @@ runs:
if: ${{ inputs.pyarrow-version }}

- name: Install ${{ inputs.environment-file }}
uses: conda-incubator/setup-miniconda@v2.1.1
uses: mamba-org/provision-with-micromamba@v12
with:
environment-file: ${{ inputs.environment-file }}
activate-environment: ${{ inputs.environment-name }}
python-version: ${{ inputs.python-version }}
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
environment-name: ${{ inputs.environment-name }}
extra-specs: ${{ inputs.extra-specs }}
channels: conda-forge
mamba-version: "0.24"
use-mamba: true
use-only-tar-bz2: true
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
condarc-file: ci/condarc.yml
cache-env: true
cache-downloads: true
6 changes: 0 additions & 6 deletions .github/workflows/asv-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ jobs:
with:
fetch-depth: 0

- name: Cache conda
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
- name: Set up Conda
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ jobs:
with:
fetch-depth: 0

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

- name: Set up Conda
uses: ./.github/actions/setup-conda

Expand Down Expand Up @@ -115,12 +109,6 @@ jobs:
with:
fetch-depth: 0

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

- name: Set up Conda
uses: ./.github/actions/setup-conda

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ jobs:
- name: Set up Conda
uses: ./.github/actions/setup-conda
with:
environment-file: ""
environment-file: false
environment-name: pandas-sdist
python-version: ${{ matrix.python-version }}
extra-specs: |
python =${{ matrix.python-version }}

- name: Install pandas from sdist
run: |
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,6 @@ jobs:
with:
fetch-depth: 0

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

- name: Extra installs
# xsel for clipboard tests
run: sudo apt-get update && sudo apt-get install -y xsel ${{ env.EXTRA_APT }}
Expand Down