4 DEF_CFLAGS: -O2 -g -Wall
8 name: Build and test with gcc
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
18 name: Build and test with clang
19 runs-on: ubuntu-latest
21 - uses: actions/checkout@v3
22 - name: Install dependencies
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
32 name: Build and test with gcc -m32
33 runs-on: ubuntu-latest
35 - uses: actions/checkout@v3
36 - name: Install dependencies
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
46 name: Build and test with ASAN enabled
47 runs-on: ubuntu-latest
49 - uses: actions/checkout@v3
50 - name: Install dependencies
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"
59 name: Build and test with UBSAN enabled
60 runs-on: ubuntu-latest
62 - uses: actions/checkout@v3
63 - name: Install dependencies
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"
72 name: Build and test on macOS
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
84 name: Build mke2fs on Windows with ${{matrix.sys}}
85 runs-on: windows-latest
89 - { sys: mingw32, env: i686 }
90 - { sys: mingw64, env: x86_64 }
95 - uses: actions/checkout@v3
96 - uses: msys2/setup-msys2@v2
98 msystem: ${{matrix.sys}}
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