You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ab...@apache.org on 2021/02/18 22:16:30 UTC

[nifi-minifi-cpp] branch main updated: Introduce ccache in MacOS builds

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

aboda pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 281801f  Introduce ccache in MacOS builds
281801f is described below

commit 281801faff6c51037fdeabfa012ea5361baaa290
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Mon Feb 15 10:00:18 2021 +0100

    Introduce ccache in MacOS builds
    
    Signed-off-by: Arpad Boda <ab...@apache.org>
    
    This closes #1007
---
 .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f85f3bb..b894a30 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -4,14 +4,26 @@ jobs:
   macos_xcode_11_2_1:
     name: "macos-xcode11.2.1"
     runs-on: macos-10.15
-    timeout-minutes: 60
+    timeout-minutes: 90
+    env:
+      CCACHE_BASEDIR: ${{ GITHUB.WORKSPACE }}
+      CCACHE_DIR: ${{ GITHUB.WORKSPACE }}/.ccache
     steps:
       - id: checkout
         uses: actions/checkout@v2
+      - id: cache
+        uses: actions/cache@v2
+        with:
+          path:  ${{ env.CCACHE_DIR }}
+          key: macos-xcode11.2.1-ccache-${{github.ref}}-${{github.sha}}
+          restore-keys: |
+            macos-xcode11.2.1-ccache-${{github.ref}}-
+            macos-xcode11.2.1-ccache-refs/heads/main-
       - id: install_dependencies
-        run: brew install ossp-uuid boost flex openssl python lua@5.3 xz libssh2
+        run: brew install ossp-uuid boost flex openssl python lua@5.3 xz libssh2 ccache
       - id: setup_env
         run: |
+          echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/bin:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
           echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
           sudo xcode-select -switch /Applications/Xcode_11.2.1.app
       - id: build
@@ -22,14 +34,26 @@ jobs:
   macos_xcode_12_0:
     name: "macos-xcode12.0"
     runs-on: macos-10.15
-    timeout-minutes: 60
+    timeout-minutes: 90
+    env:
+      CCACHE_BASEDIR: ${{ GITHUB.WORKSPACE }}
+      CCACHE_DIR: ${{ GITHUB.WORKSPACE }}/.ccache
     steps:
       - id: checkout
         uses: actions/checkout@v2
+      - id: cache
+        uses: actions/cache@v2
+        with:
+          path: ${{ env.CCACHE_DIR }}
+          key: macos-xcode12.0-ccache-${{github.ref}}-${{github.sha}}
+          restore-keys: |
+            macos-xcode12.0-ccache-${{github.ref}}-
+            macos-xcode12.0-ccache-refs/heads/main-
       - id: install_dependencies
-        run: brew install ossp-uuid boost flex openssl python lua@5.3 xz libssh2
+        run: brew install ossp-uuid boost flex openssl python lua@5.3 xz libssh2 ccache
       - id: setup_env
         run: |
+          echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/bin:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
           echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
           sudo xcode-select -switch /Applications/Xcode_12.app
       - id: build