-
Notifications
You must be signed in to change notification settings - Fork 11
53 lines (45 loc) · 1.29 KB
/
ci.yaml
File metadata and controls
53 lines (45 loc) · 1.29 KB
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
name: CI with cppcheck
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-static:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential autoconf automake libtool pkg-config \
cmake cppcheck doxygen
- name: Bootstrap & configure
run: |
if [ -f bootstrap.sh ]; then
chmod +x ./bootstrap.sh && ./bootstrap.sh || true
fi
autoreconf -i || true
./configure || true
- name: Build
run: |
make -j$(nproc) || true
- name: Run cppcheck (static analysis)
run: |
cppcheck --enable=all --inconclusive --std=c99 --suppress=missingIncludeSystem src || true
- name: Run make check (if available)
run: |
if make -n check >/dev/null 2>&1; then
make check || true
else
echo "no make check target"
fi
- name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: libethercat-build
path: |
./src
./configure.log || true