Skip to content

Add setup-conda action #46611

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 11 commits into from
Jun 3, 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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
PANDAS_CI: "1"
steps:
- checkout
- run: ci/setup_env.sh
- run: .circleci/setup_env.sh
- run: PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH ci/run_tests.sh

workflows:
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions .github/actions/setup-conda/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Set up Conda environment
inputs:
environment-file:
description: Conda environment file to use.
default: environment.yml
pyarrow-version:
description: If set, overrides the PyArrow version in the Conda environment to the given string.
required: false
runs:
using: composite
steps:
- name: Set Arrow version in ${{ inputs.environment-file }} to ${{ inputs.pyarrow-version }}
run: |
grep -q ' - pyarrow' ${{ inputs.environment-file }}
sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
cat ${{ inputs.environment-file }}
shell: bash
if: ${{ inputs.pyarrow-version }}

- name: Install ${{ inputs.environment-file }}
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: ${{ inputs.environment-file }}
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
channels: conda-forge
mamba-version: "0.23"
use-mamba: true
12 changes: 0 additions & 12 deletions .github/actions/setup/action.yml

This file was deleted.

25 changes: 14 additions & 11 deletions .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,46 @@ jobs:
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-web-docs
cancel-in-progress: true

defaults:
run:
shell: bash -el {0}

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

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

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

- name: Build website
run: |
source activate pandas-dev
python web/pandas_web.py web/pandas --target-path=web/build
run: python web/pandas_web.py web/pandas --target-path=web/build

- name: Build documentation
run: |
source activate pandas-dev
doc/make.py --warnings-are-errors
run: doc/make.py --warnings-are-errors

- name: Install ssh key
run: |
mkdir -m 700 -p ~/.ssh
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}}
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

- name: Copy cheatsheets into site directory
run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/

- name: Upload web
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}}
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

- name: Upload dev docs
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}}
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

- name: Move docs into site directory
run: mv doc/build/html web/build/docs
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/macos-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,18 @@ jobs:
with:
fetch-depth: 0

- name: Install Dependencies
uses: conda-incubator/setup-[email protected]
- name: Set up Conda
uses: ./.github/actions/setup-conda
with:
mamba-version: "*"
channels: conda-forge
activate-environment: pandas-dev
channel-priority: ${{ matrix.os == 'macos-latest' && 'flexible' || 'strict' }}
environment-file: ci/deps/${{ matrix.env_file }}
use-only-tar-bz2: true

# ImportError: 2): Library not loaded: @rpath/libssl.1.1.dylib
# Referenced from: /Users/runner/miniconda3/envs/pandas-dev/lib/libthrift.0.13.0.dylib
# Reason: image not found
- name: Upgrade pyarrow on MacOS
run: conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=6
if: ${{ matrix.os == 'macos-latest' }}
pyarrow-version: ${{ matrix.os == 'macos-latest' && '6' || '' }}

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

- name: Test
run: ci/run_tests.sh

- name: Build Version
run: conda list

- name: Publish test results
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def run(self):
extra_compile_args.append("/Z7")
extra_link_args.append("/DEBUG")
else:
# PANDAS_CI=1 is set by ci/setup_env.sh
# PANDAS_CI=1 is set in CI
if os.environ.get("PANDAS_CI", "0") == "1":
extra_compile_args.append("-Werror")
if debugging_symbols_requested:
Expand Down