forked from AndreRenaud/PDFGen
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (84 loc) · 2.44 KB
/
build_and_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
88
89
90
name: Build and Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://andredesigna/pdfgen:latest
steps:
- uses: actions/checkout@v1
- name: Build Win32
run: |
make clean
make CC=/usr/lib/mxe/usr/bin/i686-w64-mingw32.static-gcc CLANG_FORMAT=clang-format-10
cp testprog testprog.exe
- name: Infer
run: make clean && infer run --no-progress-bar -- make CFLAGS="-g -Wall -pipe" LFLAGS=""
- name: Build
run: make clean && make
- name: Update coverage statistics
shell: bash
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
if [[ "${GITHUB_REF##*/}" == "master" ]] ; then
./testprog
coveralls -i pdfgen.c
fi
- name: Test
run: make clean && scan-build-10 --status-bugs make check CLANG_FORMAT=clang-format-10
- name: Fuzz Test
run: make fuzz-check CLANG=clang-10 CLANG_FORMAT=clang-format-10 -j8
- name: Docs
run: make docs
- name: Coverage
run: make clean && make coverage
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: |
output.pdf
pdfgen.h
pdfgen.o
doc/html/
testprog
testprog.exe
coverage-html/
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: make x64
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
make clean
make testprog.exe CC=cl
cp testprog.exe testprog-64.exe
testprog-64
cp output.pdf output-win64.pdf
- name: make x86
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
make clean
make testprog.exe CC=cl
cp testprog.exe testprog-32.exe
testprog-32
cp output.pdf output-win32.pdf
- name: Upload aritfacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: |
output-win32.pdf
output-win64.pdf
testprog-32.exe
testprog-64.exe
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: make
run: make