From 0fe3ecab42c9b754b10ce20d69347e72be4f9d61 Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Wed, 22 Jun 2022 17:18:24 +0200 Subject: [PATCH 1/6] Cache Conda env --- .github/actions/build_pandas/action.yml | 4 ++-- .github/actions/setup-conda/action.yml | 13 ++++++------- .github/workflows/sdist.yml | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/actions/build_pandas/action.yml b/.github/actions/build_pandas/action.yml index 39d5998b4ee74..23bb988ef4d73 100644 --- a/.github/actions/build_pandas/action.yml +++ b/.github/actions/build_pandas/action.yml @@ -6,8 +6,8 @@ runs: - name: Environment Detail run: | - conda info - conda list + micromamba info + micromamba list shell: bash -el {0} - name: Build Pandas diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/action.yml index 87a0bd2ed1715..9aef86677ca1a 100644 --- a/.github/actions/setup-conda/action.yml +++ b/.github/actions/setup-conda/action.yml @@ -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: | + python =${{ inputs.python-version }} 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 diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml index 5ae2280c5069f..4534eedfa683e 100644 --- a/.github/workflows/sdist.yml +++ b/.github/workflows/sdist.yml @@ -62,7 +62,7 @@ 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 }} From 2ee165d1fdc9a9721529eb7c657ccbc22d9276c6 Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Thu, 23 Jun 2022 22:21:25 +0200 Subject: [PATCH 2/6] python-version -> extra-specs --- .github/actions/setup-conda/action.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/action.yml index 9aef86677ca1a..d04bef9d0b6e2 100644 --- a/.github/actions/setup-conda/action.yml +++ b/.github/actions/setup-conda/action.yml @@ -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. @@ -28,8 +28,7 @@ runs: with: environment-file: ${{ inputs.environment-file }} environment-name: ${{ inputs.environment-name }} - extra-specs: | - python =${{ inputs.python-version }} + extra-specs: ${{ inputs.extra-specs }} channels: conda-forge channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }} condarc-file: ci/condarc.yml From f938de8f3c2e030386871cbc477c12a294d65e38 Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Thu, 23 Jun 2022 22:22:00 +0200 Subject: [PATCH 3/6] python-version -> extra-specs --- .github/workflows/sdist.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml index 4534eedfa683e..1fb400f178a76 100644 --- a/.github/workflows/sdist.yml +++ b/.github/workflows/sdist.yml @@ -15,7 +15,7 @@ on: jobs: build: - if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}} + #if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}} runs-on: ubuntu-latest timeout-minutes: 60 defaults: @@ -64,7 +64,8 @@ jobs: with: environment-file: false environment-name: pandas-sdist - python-version: ${{ matrix.python-version }} + extra-specs: | + python =${{ matrix.python-version }} - name: Install pandas from sdist run: | From f0b1b62454ef220c1d38395c1a137b33c936d922 Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Thu, 23 Jun 2022 22:29:37 +0200 Subject: [PATCH 4/6] Remove old broken conda caching --- .github/workflows/asv-bot.yml | 6 ------ .github/workflows/code-checks.yml | 12 ------------ .github/workflows/ubuntu.yml | 9 --------- 3 files changed, 27 deletions(-) diff --git a/.github/workflows/asv-bot.yml b/.github/workflows/asv-bot.yml index 022c12cf6ff6c..dbf0ab0acb9ec 100644 --- a/.github/workflows/asv-bot.yml +++ b/.github/workflows/asv-bot.yml @@ -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 diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index e8f54b33a92c0..85a7f26d7b505 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -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 @@ -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 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 961ba57d36b94..8d6cae6278dcf 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -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 }} From 2135063ae55df3410588f41e9589e482f584e82e Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Fri, 24 Jun 2022 11:05:22 +0200 Subject: [PATCH 5/6] Add cache-downloads: true --- .github/actions/setup-conda/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/action.yml index d04bef9d0b6e2..002d0020c2df1 100644 --- a/.github/actions/setup-conda/action.yml +++ b/.github/actions/setup-conda/action.yml @@ -33,3 +33,4 @@ runs: channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }} condarc-file: ci/condarc.yml cache-env: true + cache-downloads: true From ca9cd6b2b66a5d8dfe3ae2d0a55f154154c29461 Mon Sep 17 00:00:00 2001 From: Jonas Haag Date: Sun, 26 Jun 2022 16:05:45 +0200 Subject: [PATCH 6/6] Undo debug change --- .github/workflows/sdist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml index 1fb400f178a76..89312cdaaa80a 100644 --- a/.github/workflows/sdist.yml +++ b/.github/workflows/sdist.yml @@ -15,7 +15,7 @@ on: jobs: build: - #if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}} + if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}} runs-on: ubuntu-latest timeout-minutes: 60 defaults: