Apache DataFusion SQL Query Engine
ARROW-8781: [CI][MinGW] Enable ccache
Sutou Kouheibbea0f8b7ab9
diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.ymlindex dca34aed1a..0664cbbbf1 100644--- a/.github/workflows/cpp.yml+++ b/.github/workflows/cpp.yml@@ -223,7 +223,7 @@ jobs:ARROW_DATASET: ONARROW_FLIGHT: ONARROW_HDFS: OFF- ARROW_HOME: /mingw{{ matrix.mingw-n-bits }}+ ARROW_HOME: /mingw${{ matrix.mingw-n-bits }}ARROW_JEMALLOC: OFFARROW_PARQUET: ONARROW_PYTHON: ON@@ -268,6 +268,12 @@ jobs:. ..\env.ps1bash ci\scripts\msys2_system_upgrade.shbash ci\scripts\msys2_setup.sh cpp+ - name: Cache ccache+ uses: actions/cache@v1+ with:+ path: ccache+ key: cpp-ccache-mingw${{ matrix.mingw-n-bits }}-${{ hashFiles('cpp/**') }}+ restore-keys: cpp-ccache-mingw${{ matrix.mingw-n-bits }}-- name: Buildrun: |. ..\env.ps1diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.ymlindex 3988c4dc3d..6c95dff65b 100644--- a/.github/workflows/ruby.yml+++ b/.github/workflows/ruby.yml@@ -212,6 +212,12 @@ jobs:run: |ridk exec bash ci\scripts\msys2_system_upgrade.shridk exec bash ci\scripts\msys2_setup.sh ruby+ - name: Cache ccache+ uses: actions/cache@v1+ with:+ path: ccache+ key: ruby-ccache-mingw${{ matrix.mingw-n-bits }}-${{ hashFiles('cpp/**') }}+ restore-keys: ruby-ccache-mingw${{ matrix.mingw-n-bits }}-- name: Build C++run: |$Env:CMAKE_BUILD_PARALLEL_LEVEL = $Env:NUMBER_OF_PROCESSORSdiff --git a/ci/scripts/msys2_bootstrap.ps1 b/ci/scripts/msys2_bootstrap.ps1index e287620093..13ee743944 100755--- a/ci/scripts/msys2_bootstrap.ps1+++ b/ci/scripts/msys2_bootstrap.ps1@@ -17,12 +17,6 @@Param([Parameter(Mandatory=$true)][int32]$n_bits)-git clone `- --depth 1 `- --quiet `- https://github.com/msys2/msys2-ci-base.git `- ..\msys64-echo "" > env.ps1If (${n_bits} -eq 32) {@@ -45,7 +39,7 @@ echo "`$Env:MSYSTEM_PREFIX = `"/mingw${n_bits}`"" `echo "`$Env:MSYSTEM = `"MINGW${n_bits}`"" `>> ../env.ps1-$MSYS_ROOT_WINDOWS = "$(Get-Location)\..\msys64"+$MSYS_ROOT_WINDOWS = "C:\msys64"echo "`$Env:MSYS_ROOT_WINDOWS = `"${MSYS_ROOT_WINDOWS}`"" `>> ../env.ps1diff --git a/ci/scripts/msys2_setup.sh b/ci/scripts/msys2_setup.shindex 923362eb8f..e77b0f8038 100755--- a/ci/scripts/msys2_setup.sh+++ b/ci/scripts/msys2_setup.sh@@ -24,8 +24,7 @@ target=$1packages=()case "${target}" incpp|c_glib|ruby)- # ccache may be broken on MinGW.- # packages+=(ccache)+ packages+=(${MINGW_PACKAGE_PREFIX}-ccache)packages+=(${MINGW_PACKAGE_PREFIX}-boost)packages+=(${MINGW_PACKAGE_PREFIX}-brotli)packages+=(${MINGW_PACKAGE_PREFIX}-cmake)@@ -52,7 +51,24 @@ case "${target}" in;;esac+# Ensure removing unused gcc related sub packagespacman \+ --noconfirm \+ --remove \+ "${MINGW_PACKAGE_PREFIX}-gcc-ada" \+ "${MINGW_PACKAGE_PREFIX}-gcc-fortran" \+ "${MINGW_PACKAGE_PREFIX}-gcc-libgfortran" \+ "${MINGW_PACKAGE_PREFIX}-gcc-objc" || :++pacman \+ --needed \--noconfirm \--sync \"${packages[@]}"++echo "::set-env name=ARROW_USE_CCACHE::ON"+echo "::set-env name=CCACHE_COMPILERCHECK::content"+echo "::set-env name=CCACHE_COMPRESS::1"+echo "::set-env name=CCACHE_COMPRESSLEVEL::6"+echo "::set-env name=CCACHE_MAXSIZE::500M"+echo "::set-env name=CCACHE_DIR::$(cygpath --absolute --windows ccache)"diff --git a/ci/scripts/msys2_system_upgrade.sh b/ci/scripts/msys2_system_upgrade.shindex 8dab4031c2..2d7b1538b5 100755--- a/ci/scripts/msys2_system_upgrade.sh+++ b/ci/scripts/msys2_system_upgrade.sh@@ -19,14 +19,6 @@set -eux-# Update pacman manually from old MSYS2.-# See also: https://github.com/msys2/MSYS2-packages/issues/1960-pacman --noconfirm --refresh --sync zstd-wget -q http://repo.msys2.org/msys/x86_64/pacman-5.2.1-7-x86_64.pkg.tar.zst-zstd -d pacman-5.2.1-7-x86_64.pkg.tar.zst-gzip pacman-5.2.1-7-x86_64.pkg.tar-pacman --noconfirm --upgrade ./pacman-5.2.1-7-x86_64.pkg.tar.gz-pacman \--noconfirm \--sync \