Apache DataFusion SQL Query Engine
ARROW-11234: [CI][Ruby][macOS] Reduce CI time
Sutou Kouheib3f1e8b51c5d
diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.ymlindex f2ee60fbea..03f4f0eb0d 100644--- a/.github/workflows/ruby.yml+++ b/.github/workflows/ruby.yml@@ -126,7 +126,7 @@ jobs:- name: Fetch Submodules and Tagsshell: bashrun: ci/scripts/util_checkout.sh- - name: Install Dependencies+ - name: Install Homebrew Dependenciesshell: bashrun: |rm -f /usr/local/bin/2to3@@ -134,15 +134,32 @@ jobs:brew unlink gcc@8 gcc@9brew bundle --file=cpp/Brewfilebrew bundle --file=c_glib/Brewfile+ - name: Install Ruby Dependencies+ run: |+ export MAKEFLAGS="-j$(sysctl -n hw.ncpu)"bundle install --gemfile c_glib/Gemfilebundle install --gemfile ruby/Gemfilefor ruby_package_gemfile in ruby/*/Gemfile; do \bundle install --gemfile ${ruby_package_gemfile}done- - name: Build- shell: bash+ - name: Setup ccache+ run: |+ ci/scripts/ccache_setup.sh+ - name: ccache info+ id: ccache-info+ run: |+ echo "::set-output name=cache-dir::$(ccache --get-config cache_dir)"+ - name: Cache ccache+ uses: actions/cache@v2+ with:+ path: ${{ steps.ccache-info.outputs.cache-dir }}+ key: ruby-ccache-macos-${{ hashFiles('cpp/**') }}+ restore-keys: ruby-ccache-macos-+ - name: Build C++run: |ci/scripts/cpp_build.sh $(pwd) $(pwd)/build+ - name: Build GLib+ run: |ci/scripts/c_glib_build.sh $(pwd) $(pwd)/build- name: Test GLibshell: bashdiff --git a/ci/scripts/ccache_setup.sh b/ci/scripts/ccache_setup.shnew file mode 100755index 0000000000..f77fbb3736--- /dev/null+++ b/ci/scripts/ccache_setup.sh@@ -0,0 +1,26 @@+#!/usr/bin/env bash+#+# Licensed to the Apache Software Foundation (ASF) under one+# or more contributor license agreements. See the NOTICE file+# distributed with this work for additional information+# regarding copyright ownership. The ASF licenses this file+# to you under the Apache License, Version 2.0 (the+# "License"); you may not use this file except in compliance+# with the License. You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing,+# software distributed under the License is distributed on an+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY+# KIND, either express or implied. See the License for the+# specific language governing permissions and limitations+# under the License.++set -eux++echo "ARROW_USE_CCACHE=ON" >> $GITHUB_ENV+echo "CCACHE_COMPILERCHECK=content" >> $GITHUB_ENV+echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV+echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV+echo "CCACHE_MAXSIZE=500M" >> $GITHUB_ENVdiff --git a/ci/scripts/msys2_setup.sh b/ci/scripts/msys2_setup.shindex 793c5bf3f2..3f451e96b8 100755--- a/ci/scripts/msys2_setup.sh+++ b/ci/scripts/msys2_setup.sh@@ -64,9 +64,5 @@ pacman \--sync \"${packages[@]}"-echo "ARROW_USE_CCACHE=ON" >> $GITHUB_ENV-echo "CCACHE_COMPILERCHECK=content" >> $GITHUB_ENV-echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV-echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV-echo "CCACHE_MAXSIZE=500M" >> $GITHUB_ENV+"$(dirname $0)/ccache_setup.sh"echo "CCACHE_DIR=$(cygpath --absolute --windows ccache)" >> $GITHUB_ENV