-
Notifications
You must be signed in to change notification settings - Fork 200
98 lines (80 loc) · 2.28 KB
/
main.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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install_dependencies
run: sudo apt-get install libcunit1-dev clang
- name: make
run: make clean all test
- name: clang_sanitize_address
env:
CC: clang
CFLAGS: -g -O0 -fsanitize=address
LDFLAGS: -g -fsanitize=address
run: make clean test
- name: clang_sanitize_address_device_errors
env:
CC: clang
CFLAGS: -g -O0 -fsanitize=address -DUSE_DEVICE_DEPENDENT_ERROR_INFORMATION=0
LDFLAGS: -g -fsanitize=address
run: make clean test
- name: clang_sanitize_address_nomalloc
env:
CC: clang
CFLAGS: -g -O0 -fsanitize=address -DUSE_MEMORY_ALLOCATION_FREE=0
LDFLAGS: -g -fsanitize=address
run: make clean test
- name: gcc-c89
env:
CFLAGS: -std=c89
run: make clean all test
- name: gcc-c90
env:
CFLAGS: -std=c90
run: make clean all test
- name: gcc-c99
env:
CFLAGS: -std=c99
run: make clean all test
- name: gcc-gnu99
env:
CFLAGS: -std=gnu99
run: make clean all test
build-arm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: armv7
distro: ubuntu_latest
install: |
apt-get update -q -y
apt-get install -q -y build-essential libcunit1-dev
run: make clean all test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install_dependencies
run: sudo apt-get install libcunit1-dev lcov
- name: coverage
env:
CFLAGS: -fprofile-arcs -ftest-coverage
CXXFLAGS: -fprofile-arcs -ftest-coverage
LDFLAGS: -lgcov
run: make clean all test
- name: lcov_capture
run: lcov --capture --directory libscpi/ --output-file lcov.info
- name: lcov_cleanup
run: lcov --remove lcov.info '*/test/*' --output-file lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info