From a6a6b0f0b45f11a92075e0187342ee9e09c0e4e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 19 Jan 2020 18:30:57 +0100 Subject: [PATCH] caching --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 832ce867..1cb86b4c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: cd mdr cabal update cabal install --only-dependencies - cabal configure --enable-tests + cabal configure cabal build cabal install @@ -42,13 +42,14 @@ jobs: fi cabal install + - name: Gwion [ cache ] - uses: actions/cache@v1 id: gwion-bin with: path: Gwion key: ${{ runner.os }}-gwion - - name: Gwion + - name: Gwion [ init ] if: steps.gwion-bin.outputs.cache-hit != 'true' run: | git clone https://github.com/fennecdjay/Gwion @@ -57,7 +58,7 @@ jobs: make cp gwion .. - - name: Gwion + - name: Gwion [ update ] if: steps.gwion-bin.outputs.cache-hit == 'true' run: | cd Gwion @@ -69,13 +70,33 @@ jobs: fi cp gwion .. - - name: Benchmark + - name: wren [ cache ] + - uses: actions/cache@v1 + id: wren + with: + path: wren + key: ${{ runner.os }}-wren + + - name: wren [ init ] + if: steps.wren.outputs.cache-hit != 'true' run: | - echo 1 | sudo tee /proc/sys/kernel/perf_event_paranoid git clone https://github.com/wren-lang/wren cd wren make - cd .. + + - name: wren [ update ] + if: steps.wren.outputs.cache-hit == 'true' + run: | + cd wren + if [ $(git rev-parse HEAD) != $(git ls-remote https://github.com/wren-lang/wren.git HEAD | cut -f1) ] + then + git pull + make + fi + + - name: Benchmark + run: | + echo 1 | sudo tee /proc/sys/kernel/perf_event_paranoid sudo apt-get update sudo apt-get install gnuplot lua5.3 ln -s $(which lua5.3) lua @@ -90,8 +111,6 @@ jobs: - name: try mdr run: | - echo Add other actions to build, - echo test, and deploy your project. export PATH=~/.cabal/bin:$PATH make build git config --local user.email "action@github.com" -- 2.43.0