Skip to content

Use setup-conda action #47293

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 8 commits into from
Jun 10, 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
11 changes: 10 additions & 1 deletion .github/actions/setup-conda/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ inputs:
environment-file:
description: Conda environment file to use.
default: environment.yml
environment-name:
description: Name to use for the Conda environment
default: test
python-version:
description: Python version 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 @@ -21,8 +27,11 @@ runs:
uses: conda-incubator/[email protected]
with:
environment-file: ${{ inputs.environment-file }}
activate-environment: ${{ inputs.environment-name }}
python-version: ${{ inputs.python-version }}
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
channels: conda-forge
mamba-version: "0.23"
mamba-version: "0.24"
use-mamba: true
use-only-tar-bz2: true
condarc-file: ci/condarc.yml
9 changes: 2 additions & 7 deletions .github/workflows/asv-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,8 @@ jobs:

# Although asv sets up its own env, deps are still needed
# during discovery process
- uses: conda-incubator/[email protected]
with:
activate-environment: pandas-dev
channel-priority: strict
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true
condarc-file: ci/condarc.yml
- name: Set up Conda
uses: ./.github/actions/setup-conda
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could we rename this actions setup_conda to match build_pandas?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GHA convention seems to be kebab-case, see eg. https://github.com/conda-incubator/setup-miniconda/blob/main/action.yml#L23

I think we should stick to one style everywhere (action names, inputs, ...). Please make a decision if we want snake_case or kebab-case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay happy to change build_pandas to build-pandas then (feel free to change this in one of your other PRs)


- name: Run benchmarks
id: bench
Expand Down
22 changes: 4 additions & 18 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,8 @@ jobs:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}

- uses: conda-incubator/[email protected]
with:
mamba-version: "*"
channels: conda-forge
activate-environment: pandas-dev
channel-priority: strict
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true
condarc-file: ci/condarc.yml
- Name: Set up Conda
uses: ./.github/actions/setup-conda

- name: Build Pandas
id: build
Expand Down Expand Up @@ -128,15 +121,8 @@ jobs:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}

- uses: conda-incubator/[email protected]
with:
mamba-version: "*"
channels: conda-forge
activate-environment: pandas-dev
channel-priority: strict
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true
condarc-file: ci/condarc.yml
- name: Set up Conda
uses: ./.github/actions/setup-conda

- name: Build Pandas
id: build
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,11 @@ 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/[email protected]
- name: Set up Conda
uses: ./.github/actions/setup-conda
with:
mamba-version: "*"
channels: conda-forge
activate-environment: pandas-dev
channel-priority: flexible
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true
condarc-file: ci/condarc.yml

- name: Upgrade Arrow version
run: conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=${{ matrix.pyarrow_version }}
if: ${{ matrix.pyarrow_version }}
pyarrow-version: ${{ matrix.pyarrow_version }}

- name: Build Pandas
uses: ./.github/actions/build_pandas
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ jobs:
name: ${{matrix.python-version}}-sdist.gz
path: dist/*.gz

- uses: conda-incubator/[email protected]
- name: Set up Conda
uses: ./.github/actions/setup-conda
with:
activate-environment: pandas-sdist
channels: conda-forge
python-version: '${{ matrix.python-version }}'
condarc-file: ci/condarc.yml
environment-file: ""
environment-name: pandas-sdist
python-version: ${{ matrix.python-version }}

- name: Install pandas from sdist
run: |
Expand Down