-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (88 loc) · 2.26 KB
/
c.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
name: C library
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Install packages
run: |
sudo apt update
sudo apt install -y -o Acquire::Retries=50 \
autoconf-archive valgrind openssl xxd asn1c
- name: Autotools
working-directory: c
run: |
./autogen.sh
- name: Configure
working-directory: c
run: |
./configure
- name: Build
working-directory: c
run: |
make
- name: Test
working-directory: c
run: |
make check
make check-valgrind
- name: Upload failure artifacts
uses: actions/upload-artifact@v1
if: failure()
with:
name: failed
path: c
- name: Distribution
working-directory: c
run: |
make distcheck VERSION=artifact
- name: Install
working-directory: c
run: |
make
sudo make install
sudo ldconfig
- name: Usage test
working-directory: c/src
run: |
pkg-config --modversion cx
gcc -o linktest.o -c linktest.c `pkg-config --cflags cx`
gcc -o linktest linktest.o `pkg-config --libs cx`
ldd ./linktest | grep libcx.so
./linktest
- name: Upload build artifacts
uses: actions/upload-artifact@v1
with:
name: libcx.tar.gz
path: c/libcx-artifact.tar.gz
clang:
name: Build (Clang)
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Install packages
run: |
sudo apt update
sudo apt install -y -o Acquire::Retries=50 \
autoconf-archive valgrind openssl xxd asn1c clang
- name: Autotools
working-directory: c
run: |
./autogen.sh
- name: Configure
working-directory: c
run: |
CC=clang ./configure
- name: Build
working-directory: c
run: |
make
- name: Test
working-directory: c
run: |
make check
make check-valgrind