summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: a49ff33895cfdcfbd51a5cbf18bd0f3032e6d864 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---

stages:
    - test
    - coverage

Lua:
    image: alpine:edge
    stage: test
    before_script:
        - apk add -q lua5.2 lua5.3 lua5.4 git make
        - git clone https://git.sr.ht/~technomancy/fennel
        - (cd fennel; LUA=lua5.3 make install)
    script:
        - LUA_EXECUTABLES="lua5.2 lua5.3 lua5.4" make testall >/dev/null

# Luajit actually is an impostor in Alpine, as the package actually
# uses Moonjit implementation, which is different from what I'm
# working with, so Fedora 33 image is used, which as of this moment
# has latest Luajit available
Luajit:
    image: fedora:33
    stage: test
    before_script:
        - dnf install -y -q lua luajit git make
        - git clone https://git.sr.ht/~technomancy/fennel
        - (cd fennel; make install)
    script:
        - LUA=luajit make test

# We install fennel via luarocks by making local rockspect because I
# don't want to figure out how to install luacov without luarocks
Coverage:
    image: alpine:3.12.1
    stage: coverage
    before_script:
        - apk add -q lua5.3 lua5.3-dev gcc musl-dev luarocks5.3 git make
        - (cd $HOME; git clone https://git.sr.ht/~technomancy/fennel)
        - export LUA=lua5.3
        - (cd $HOME/fennel; luarocks-5.3 make rockspecs/fennel-scm-2.rockspec)
        - luarocks-5.3 install luacov
        - luarocks-5.3 install luacov-console
    script:
        - make luacov-console >/dev/null
        - luacov-console --no-colored -s