From 947fa3ee85d798e26b87bda572ab51f7a57ed242 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Thu, 25 Feb 2021 19:26:20 +0300 Subject: [PATCH] Added caching steps. --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17a60a31..06adb15d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,6 +90,34 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Grant All Perms to Make Cache Restoring Possible + run: | + sudo mkdir -p /usr/local/etc/roswell + sudo chown "${USER}" /usr/local/etc/roswell + # Here the ros binary will be restored: + sudo chown "${USER}" /usr/local/bin + - name: Get Current Month + id: current-month + run: | + echo "::set-output name=value::$(date -u "+%Y-%m")" + - name: Cache Roswell Setup + id: cache + uses: actions/cache@v2 + env: + cache-name: cache-roswell-v1 + with: + path: | + /usr/local/bin/ros + ~/.cache/common-lisp/ + ~/.roswell + /usr/local/etc/roswell + .qlot + key: "${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.quicklisp-dist }}-${{ matrix.lisp }}-${{ hashFiles('qlfile.lock') }}" + - name: Restore Path To Cached Files + run: | + echo $HOME/.roswell/bin >> $GITHUB_PATH + echo .qlot/bin >> $GITHUB_PATH + if: steps.cache.outputs.cache-hit == 'true' - uses: 40ants/setup-lisp@v1 with: asdf-system: cl-info @@ -99,6 +127,7 @@ jobs: {% endifequal %} github mgl-pax svetlyak40wt/mgl-pax :branch mgl-pax-minimal + if: steps.cache.outputs.cache-hit != 'true' - name: Check Roswell setup run: ros config