-
-
Notifications
You must be signed in to change notification settings - Fork 68
87 lines (81 loc) · 2.07 KB
/
test.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
name: "test"
on: [push]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
cc: [gcc, clang]
exclude:
- os: macos-latest
cc: gcc
- os: windows-latest
cc: clang
runs-on: ${{matrix.os}}
env:
CC: ${{matrix.cc}}
CFLAGS: -Wextra -Werror -Wno-implicit-fallthrough
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Show C compiler information
run: ${{matrix.cc}} -v
- name: Compile
run: make CC=${{matrix.cc}}
- name: Test
run: make test CC=${{matrix.cc}}
- name: Install (Unix)
if: ${{ matrix.os != 'windows-latest' }}
run: sudo make install
- name: Install (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: make install
- name: Run hello world example
if: ${{ matrix.os != 'windows-latest' }}
run: nelua --verbose examples/helloworld.nelua
test-32bits:
runs-on: ubuntu-latest
env:
CFLAGS: -m32
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install gcc-multilib
- name: Compile
run: make
- name: Test
run: make test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: leafo/gh-actions-lua@v9
- uses: leafo/gh-actions-luarocks@v4
- name: Install luacov
run: luarocks install cluacov
- name: Coverage
run: |
echo "return {}" > .neluacfg.lua
make coverage-test
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: leafo/gh-actions-lua@v9
- uses: leafo/gh-actions-luarocks@v4
- name: Install luacheck
run: luarocks install luacheck
- name: Check
run: luacheck .
sanitize:
runs-on: ubuntu-latest
env:
CFLAGS: -fsanitize=address -fsanitize=undefined
steps:
- uses: actions/checkout@master
- name: Compile
run: make
- name: Test
run: make test