]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blob - .github/workflows/ci.yml
ci.yml: use actions/checkout@v3 to switch to using Node 16
[thirdparty/e2fsprogs.git] / .github / workflows / ci.yml
1 name: CI
2 on: [push]
3 env:
4 DEF_CFLAGS: -O2 -g -Wall
5
6 jobs:
7 gcc-build-and-test:
8 name: Build and test with gcc
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v3
12 - run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS"
13 - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
14 - run: make -j8 install V=1 DESTDIR=$PWD/installdir
15 - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
16
17 clang-build-and-test:
18 name: Build and test with clang
19 runs-on: ubuntu-latest
20 steps:
21 - uses: actions/checkout@v3
22 - name: Install dependencies
23 run: |
24 sudo apt-get update
25 sudo apt-get install -y clang
26 - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS"
27 - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
28 - run: make -j8 install V=1 DESTDIR=$PWD/installdir
29 - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
30
31 i386-build-and-test:
32 name: Build and test with gcc -m32
33 runs-on: ubuntu-latest
34 steps:
35 - uses: actions/checkout@v3
36 - name: Install dependencies
37 run: |
38 sudo apt-get update
39 sudo apt-get install -y gcc-multilib
40 - run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS -m32" LDFLAGS="-m32"
41 - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
42 - run: make -j8 install V=1 DESTDIR=$PWD/installdir
43 - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
44
45 asan-build-and-test:
46 name: Build and test with ASAN enabled
47 runs-on: ubuntu-latest
48 steps:
49 - uses: actions/checkout@v3
50 - name: Install dependencies
51 run: |
52 sudo apt-get update
53 sudo apt-get install -y clang
54 - run: echo "ASAN_CFLAGS=$DEF_CFLAGS -fsanitize=address -fno-sanitize-recover=address" >> $GITHUB_ENV
55 - run: ./configure CC=clang CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS"
56 - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
57
58 ubsan-build-and-test:
59 name: Build and test with UBSAN enabled
60 runs-on: ubuntu-latest
61 steps:
62 - uses: actions/checkout@v3
63 - name: Install dependencies
64 run: |
65 sudo apt-get update
66 sudo apt-get install -y clang
67 - run: echo "UBSAN_CFLAGS=$DEF_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" >> $GITHUB_ENV
68 - run: ./configure CC=clang CFLAGS="$UBSAN_CFLAGS" LDFLAGS="$UBSAN_CFLAGS"
69 - run: make -j8 check V=1 CFLAGS_WARN="-Werror"
70
71 macos-build-and-test:
72 name: Build and test on macOS
73 runs-on: macos-latest
74 steps:
75 - uses: actions/checkout@v3
76 - run: ./configure CFLAGS="$DEF_CFLAGS"
77 # -Wno-error=deprecated-declarations is needed to suppress known warnings
78 # due to e2fsprogs' use of sbrk(0) and daemon().
79 - run: make -j8 check V=1 CFLAGS_WARN="-Werror -Wno-error=deprecated-declarations"
80 - run: make -j8 install DESTDIR=$PWD/installdir
81 - run: make -j8 uninstall DESTDIR=$PWD/installdir
82
83 windows-msys2-build:
84 name: Build mke2fs on Windows with ${{matrix.sys}}
85 runs-on: windows-latest
86 strategy:
87 matrix:
88 include:
89 - { sys: mingw32, env: i686 }
90 - { sys: mingw64, env: x86_64 }
91 defaults:
92 run:
93 shell: msys2 {0}
94 steps:
95 - uses: actions/checkout@v3
96 - uses: msys2/setup-msys2@v2
97 with:
98 msystem: ${{matrix.sys}}
99 update: true
100 install: >
101 make
102 mingw-w64-${{matrix.env}}-cc
103 # For now the only parts that actually build for Windows are mke2fs and its
104 # dependencies: all libraries except libss. The build system doesn't want
105 # to build just those parts, though, so do it one step at a time...
106 - run: ./configure CFLAGS="$DEF_CFLAGS"
107 - run: make -j8 subs V=1 CFLAGS_WARN="-Werror"
108 - run: make -j8 -C lib/et/ all V=1 CFLAGS_WARN="-Werror"
109 - run: make -j8 -C lib/uuid/ all V=1 CFLAGS_WARN="-Werror"
110 - run: make -j8 -C lib/blkid/ all V=1 CFLAGS_WARN="-Werror"
111 - run: make -j8 -C lib/ext2fs/ all V=1 CFLAGS_WARN="-Werror"
112 - run: make -j8 -C lib/support/ all V=1 CFLAGS_WARN="-Werror"
113 - run: make -j8 -C lib/e2p/ all V=1 CFLAGS_WARN="-Werror"
114 - run: make -j8 -C misc/ mke2fs V=1 CFLAGS_WARN="-Werror"
115 - run: touch image.ext4
116 - run: misc/mke2fs.exe -T ext4 image.ext4 128M