From 0b29deeff5f0bea56b5a7785ba498b44f1480c3e Mon Sep 17 00:00:00 2001 From: Andrey Listopadov Date: Sat, 13 Mar 2021 09:04:38 +0000 Subject: fix: try caching installations fix: fix luarocks path cmd fix: repair fix: repair fix: tweak cache paths fix: apparently cache is project-local fix: don't clone dependencies if present fix: pipelines fix: pipelines fix: pipelines fix: reduce duplication fix: reduce duplications fix: reduce duplication fix: pipelines --- .gitlab-ci.yml | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 72ec9b2..2fe681c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,21 +4,41 @@ stages: - test - coverage +cache: + paths: + - .cache + +.install_fennel: &fennel |- + cd .cache + [ -d fennel ] || git clone -q --depth 1 https://git.sr.ht/~technomancy/fennel + cd fennel || exit -1 + git checkout 0.8.1 + make clean + make install + cd "$CI_PROJECT_DIR" + +.install_fenneldoc: &fenneldoc |- + cd .cache + [ -d fenneldoc ] || git clone -q --depth 1 https://gitlab.com/andreyorst/fenneldoc + cd fenneldoc || exit -1 + git checkout -q --recurse-submodules v0.1.0 + make clean + make install + cd "$CI_PROJECT_DIR" + Lua: image: alpine:edge stage: test before_script: + - mkdir -p .cache - > apk add -q lua5.2 lua5.3 lua5.3-dev lua5.4 luarocks5.3 git make gcc musl-dev - - git clone --depth 1 https://git.sr.ht/~technomancy/fennel - - (cd fennel; LUA=lua5.3 make install) - luarocks-5.3 install luafilesystem - - > - git clone --depth 1 --branch v0.1.0 --recursive - https://gitlab.com/andreyorst/fenneldoc.git - - (cd fenneldoc; LUA=lua5.3 make install) + - export LUA=lua5.3 + - *fennel + - *fenneldoc script: - LUA_EXECUTABLES="lua5.2 lua5.3 lua5.4" make testall >/dev/null @@ -30,13 +50,12 @@ Luajit: image: fedora:33 stage: test before_script: + - mkdir -p .cache - dnf install -y -q lua luajit git make - - git clone https://git.sr.ht/~technomancy/fennel - - (cd fennel; make install) + - *fennel script: - LUA=luajit make test - # We install fennel via luarocks because I don't want to figure out # how to install luacov without luarocks Coverage: -- cgit v1.2.3