forked from tytso/e2fsprogs
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (75 loc) · 2.76 KB
/
ci.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
name: CI
on: [push]
env:
DEF_CFLAGS: -O2 -g -Wall
jobs:
gcc-build-and-test:
name: Build and test with gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS"
- run: make -j8 check V=1 CFLAGS_WARN="-Werror"
- run: make -j8 install V=1 DESTDIR=$PWD/installdir
- run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
clang-build-and-test:
name: Build and test with clang
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang
- run: ./configure CC=clang CFLAGS="$DEF_CFLAGS"
- run: make -j8 check V=1 CFLAGS_WARN="-Werror"
- run: make -j8 install V=1 DESTDIR=$PWD/installdir
- run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
i386-build-and-test:
name: Build and test with gcc -m32
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-multilib
- run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS -m32" LDFLAGS="-m32"
- run: make -j8 check V=1 CFLAGS_WARN="-Werror"
- run: make -j8 install V=1 DESTDIR=$PWD/installdir
- run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
asan-build-and-test:
name: Build and test with ASAN enabled
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang
- run: echo "ASAN_CFLAGS=$DEF_CFLAGS -fsanitize=address -fno-sanitize-recover=address" >> $GITHUB_ENV
- run: ./configure CC=clang CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS"
- run: make -j8 check V=1 CFLAGS_WARN="-Werror"
ubsan-build-and-test:
name: Build and test with UBSAN enabled
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang
- run: echo "UBSAN_CFLAGS=$DEF_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" >> $GITHUB_ENV
- run: ./configure CC=clang CFLAGS="$UBSAN_CFLAGS" LDFLAGS="$UBSAN_CFLAGS"
- run: make -j8 check V=1 CFLAGS_WARN="-Werror"
macos-build-and-test:
name: Build and test on macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- run: ./configure CFLAGS="$DEF_CFLAGS"
# -Wno-error=deprecated-declarations is needed to suppress known warnings
# due to e2fsprogs' use of sbrk(0) and daemon().
- run: make -j8 check V=1 CFLAGS_WARN="-Werror -Wno-error=deprecated-declarations"
- run: make -j8 install DESTDIR=$PWD/installdir
- run: make -j8 uninstall DESTDIR=$PWD/installdir