From ce0055d781c8ddb2e3394be6a4a27863d7af50ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 31 Jan 2020 12:52:05 +0100 Subject: [PATCH] cache lua (no more apt) --- .github/workflows/build.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 011bc55e..9f55c058 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,13 +108,36 @@ jobs: make fi -# git log -1 --pretty="%B" | grep "\[benchmark\]" || exit 0 + - uses: actions/cache@v1 + name: Lua [ cache ] + id: lua + with: + path: lua + key: ${{ runner.os }}-lua + + - name: Lua [ init ] + if: steps.lua.outputs.cache-hit != 'true' + run: | + git clone https://github.com/lua/lua + cd lua + make + + - name: Lua [ update ] + if: steps.lua.outputs.cache-hit == 'true' + run: | + cd lua + if [ $(git rev-parse HEAD) != $(git ls-remote https://github.com/lua/lua.git HEAD | cut -f1) ] + then + git pull + make + fi + cp lua .. + - name: Benchmark run: | echo 1 | sudo tee /proc/sys/kernel/perf_event_paranoid sudo apt-get update - sudo apt-get install gnuplot lua5.3 chuck - ln -s $(which lua5.3) lua + sudo apt-get install gnuplot chuck echo 'chuck --silent $@' > ./chuck chmod +x ./chuck ./chuck benchmark/string-equals.ck -- 2.43.0