lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 58828a6 1/2: Cache third party binaries in Gi


From: Vadim Zeitlin
Subject: [lmi-commits] [lmi] master 58828a6 1/2: Cache third party binaries in GitHub CI workflow
Date: Fri, 25 Sep 2020 18:39:27 -0400 (EDT)

branch: master
commit 58828a689f696ccce151bb62cd52d7f3ca914337
Author: Ilya Sinitsyn <isinitsyn@tt-solutions.com>
Commit: Vadim Zeitlin <vadim@tt-solutions.com>

    Cache third party binaries in GitHub CI workflow
    
    Cache libxml2, wxWidgets and wxPdfDoc to avoid rebuilding them every
    time and do it only if anything has really changed for them.
    
    This allows to practically halve the rebuild time.
---
 .github/workflows/ci.yml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c0965e2..28a14be 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -39,6 +39,8 @@ jobs:
         run: |
           echo "::set-env name=NORMAL_UID::`id --user`"
           echo "::set-env name=coefficiency::--jobs=`nproc`"
+          gcc_version=$(${LMI_TRIPLET}-${LMI_COMPILER} -dumpversion|tr -d '\r')
+          echo "::set-env name=gcc_version::$gcc_version"
 
       - name: Create lmi directories
         run: >
@@ -61,13 +63,26 @@ jobs:
       - name: Build miscellanea
         run: make $coefficiency --output-sync=recurse -f 
install_miscellanea.make
 
+      - name: Cache libxml2, wxWidgets and wxPdfDoc
+        id: cache-local
+        uses: actions/cache@v2
+        with:
+          path: |
+            /opt/lmi/local/${{ env.LMI_COMPILER }}_${{ env.LMI_TRIPLET }}
+            /opt/lmi/local/include
+            /opt/lmi/local/share
+          key: build-${{ env.LMI_COMPILER }}-${{ env.gcc_version }}-${{ 
env.LMI_TRIPLET }}-${{ hashFiles('install_libxml2_libxslt.make', 
'install_wx.sh', 'install_wxpdfdoc.sh') }}
+
       - name: Build libxml2
+        if: steps.cache-local.outputs.cache-hit != 'true'
         run: make $coefficiency --output-sync=recurse -f 
install_libxml2_libxslt.make
 
       - name: Build wxWidgets
+        if: steps.cache-local.outputs.cache-hit != 'true'
         run: ./install_wx.sh
 
       - name: Build wxPdfDoc
+        if: steps.cache-local.outputs.cache-hit != 'true'
         run: ./install_wxpdfdoc.sh
 
       - name: Build lmi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]