This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 922f58fd25 ARROW-16995: [CI][C++][MinGW]  Don't cache site-packages 
(#13534)
922f58fd25 is described below

commit 922f58fd25052fe6579e9aaea5384362352bbebf
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri Jul 8 09:25:10 2022 +0900

    ARROW-16995: [CI][C++][MinGW]  Don't cache site-packages (#13534)
    
    It may revert updated Python related MSYS2 packages such as
    python-numpy. This caches built wheels instead.
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 .github/workflows/cpp.yml | 10 +++++-----
 ci/scripts/msys2_setup.sh |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index a7b1e2a7fc..ba95fcd509 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -351,12 +351,12 @@ jobs:
             --output-document /usr/local/bin/minio.exe \
             
https://dl.min.io/server/minio/release/windows-amd64/archive/minio.RELEASE.2022-05-26T05-48-41Z
           chmod +x /usr/local/bin/minio.exe
-      - name: Cache Python packages
+      - name: Cache Python wheels
         uses: actions/cache@v2
         with:
-          path: "d:/a/_temp/msys64/mingw${{ matrix.mingw-n-bits 
}}/lib/python*/site-packages"
-          key: cpp-gcs-testbench-mingw${{ matrix.mingw-n-bits }}-${{ 
hashFiles('ci/scripts/install_gcs_testbench.sh') }}
-          restore-keys: cpp-gcs-testbench-mingw${{ matrix.mingw-n-bits }}-
+          path: "${{ env.PIP_CACHE_DIR }}"
+          key: cpp-wheels-mingw${{ matrix.mingw-n-bits }}-${{ 
hashFiles('ci/scripts/install_gcs_testbench.sh') }}
+          restore-keys: cpp-wheels-mingw${{ matrix.mingw-n-bits }}-
       - name: Install Google Cloud Storage Testbench
         shell: msys2 {0}
         run: |
@@ -364,7 +364,7 @@ jobs:
       - name: Test
         shell: msys2 {0}
         run: |
-          python_version=$(python -c "import sys; print('.'.join(map(str, 
sys.version_info[0:2])))")
+          python_version=$(python3 -c "import sys; print('.'.join(map(str, 
sys.version_info[0:2])))")
           export PYTHONHOME="$(cygpath --windows 
${MINGW_PREFIX})\lib\python${python_version}"
           PYTHONPATH="${PYTHONHOME}"
           PYTHONPATH="${PYTHONPATH};${PYTHONHOME}\lib-dynload"
diff --git a/ci/scripts/msys2_setup.sh b/ci/scripts/msys2_setup.sh
index 9fc9340451..fba0fa2604 100755
--- a/ci/scripts/msys2_setup.sh
+++ b/ci/scripts/msys2_setup.sh
@@ -82,3 +82,4 @@ pacman \
 
 "$(dirname $0)/ccache_setup.sh"
 echo "CCACHE_DIR=$(cygpath --absolute --windows ccache)" >> $GITHUB_ENV
+echo "PIP_CACHE_DIR=$(pip cache dir)" >> $GITHUB_ENV

Reply via email to