-
Notifications
You must be signed in to change notification settings - Fork 1
109 lines (95 loc) · 3.45 KB
/
ci.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Lint & Test
on:
push:
branches: [ master, staging, trying ]
pull_request:
branches: [ master ]
env:
CI: true
DEBIAN: noninteractive
jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- uses: leafo/[email protected]
with:
luaVersion: '5.3'
- uses: leafo/[email protected]
- name: Install LuaCheck
run: luarocks install luacheck
- name: Install task runner
run: |
mkdir ~/just && cd ~/just
wget https://github.com/casey/just/releases/download/1.0.1/just-1.0.1-x86_64-unknown-linux-musl.tar.gz
tar -xvf just-1.0.1-x86_64-unknown-linux-musl.tar.gz
sudo install ./just /usr/local/bin/just
- name: Run checks
run: just check --formatter TAP
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- lua_version: '5.1'
- lua_version: '5.2'
- lua_version: '5.3'
# LGI doesn't fully support Lua 5.4, yet. GitHub Actions don't really have a way to nicely visualize
# a build that's allowed to fail. They look like the entire pipeline failed.
# - lua_version: '5.4'
- lua_version: 'luajit'
steps:
- uses: actions/[email protected]
- uses: leafo/[email protected]
with:
luaVersion: ${{ matrix.lua_version }}
- uses: leafo/[email protected]
- name: Install dependencies
shell: /bin/bash -o errexit -o pipefail -o xtrace {0}
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gobject-introspection libgirepository1.0-dev
luarocks install busted
luarocks install lgi
luarocks install async.lua
- name: Install task runner
run: |
mkdir ~/just && cd ~/just
wget https://github.com/casey/just/releases/download/1.0.1/just-1.0.1-x86_64-unknown-linux-musl.tar.gz
tar -xvf just-1.0.1-x86_64-unknown-linux-musl.tar.gz
sudo install ./just /usr/local/bin/just
- name: Run tests
run: just --set lua "$(command -v lua)" test --output=TAP
rock:
runs-on: ubuntu-20.04
needs: [test, check]
strategy:
fail-fast: false
matrix:
include:
- lua_version: '5.1'
- lua_version: '5.2'
- lua_version: '5.3'
# LGI doesn't fully support Lua 5.4, yet. GitHub Actions don't really have a way to nicely visualize
# a build that's allowed to fail. They look like the entire pipeline failed.
# - lua_version: '5.4'
steps:
- uses: actions/[email protected]
- uses: leafo/[email protected]
with:
luaVersion: ${{ matrix.lua_version }}
- uses: leafo/[email protected]
- name: Install dependencies
shell: /bin/bash -o errexit -o pipefail -o xtrace {0}
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gobject-introspection libgirepository1.0-dev
- name: Install task runner
run: |
mkdir ~/just && cd ~/just
wget https://github.com/casey/just/releases/download/1.0.1/just-1.0.1-x86_64-unknown-linux-musl.tar.gz
tar -xvf just-1.0.1-x86_64-unknown-linux-musl.tar.gz
sudo install ./just /usr/local/bin/just
- name: Make rock
run: just --set lua "$(command -v lua)" make