summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Listopadov <andreyorst@gmail.com>2021-03-13 09:04:38 +0000
committerAndrey Listopadov <andreyorst@gmail.com>2021-03-14 18:34:12 +0300
commit0b29deeff5f0bea56b5a7785ba498b44f1480c3e (patch)
tree7990947633e405122143160c62a1c76a40231bfd
parent0a6045892511d056ee057354944ec6d8d996a7ca (diff)
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
-rw-r--r--.gitlab-ci.yml37
1 files changed, 28 insertions, 9 deletions
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: