2 on: [pull_request, push]
4 DEF_CFLAGS: -O2 -g -Wall -Werror
5 DEPENDENCIES: autoconf automake libtool pkgconf libfuse-dev ntfs-3g-dev ntfs-3g
9 name: Build and test with gcc
10 runs-on: ubuntu-latest
12 - uses: actions/checkout@v3
13 - name: Install dependencies
16 sudo apt-get install -y $DEPENDENCIES
18 - run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS"
19 - run: make -j8 check V=1
20 - run: make -j8 install V=1 DESTDIR=$PWD/installdir
21 - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
22 - uses: actions/upload-artifact@v3
29 name: Build and test with clang
30 runs-on: ubuntu-latest
32 - uses: actions/checkout@v3
33 - name: Install dependencies
36 sudo apt-get install -y clang $DEPENDENCIES
38 - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS"
39 - run: make -j8 check V=1
40 - run: make -j8 install V=1 DESTDIR=$PWD/installdir
41 - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
42 - uses: actions/upload-artifact@v3
49 name: Build and test with gcc -m32
50 runs-on: ubuntu-latest
52 - uses: actions/checkout@v3
53 - name: Install dependencies
55 sudo dpkg --add-architecture i386
57 sudo apt-get install -y gcc-multilib $DEPENDENCIES
59 - run: ./configure CC=gcc CFLAGS="-m32 $DEF_CFLAGS" --without-fuse --without-ntfs-3g
60 - run: make -j8 check V=1
61 - run: make -j8 install V=1 DESTDIR=$PWD/installdir
62 - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
63 - uses: actions/upload-artifact@v3
70 name: Build and test with ASAN enabled
71 runs-on: ubuntu-latest
73 - uses: actions/checkout@v3
74 - name: Install dependencies
77 sudo apt-get install -y clang $DEPENDENCIES
79 - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS -fsanitize=address -fno-sanitize-recover=address"
80 - run: make -j8 check V=1
81 - uses: actions/upload-artifact@v3
88 name: Build and test with UBSAN enabled
89 runs-on: ubuntu-latest
91 - uses: actions/checkout@v3
92 - name: Install dependencies
95 sudo apt-get install -y clang $DEPENDENCIES
97 - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
98 - run: make -j8 check V=1
99 - uses: actions/upload-artifact@v3
102 name: ubsan-test-logs
105 macos-build-and-test:
106 name: Build and test on macOS
107 runs-on: macos-latest
109 - uses: actions/checkout@v3
110 - name: Install dependencies
112 brew install autoconf automake libtool pkg-config
114 - run: ./configure CFLAGS="$DEF_CFLAGS" --without-fuse --without-ntfs-3g
115 - run: make -j8 check V=1
116 - run: make -j8 install DESTDIR=$PWD/installdir
117 - run: make -j8 uninstall DESTDIR=$PWD/installdir
118 - uses: actions/upload-artifact@v3
121 name: macos-test-logs
125 name: Build on Windows
126 runs-on: windows-latest
130 - { msystem: MINGW32, cc_pkg: mingw-w64-i686-gcc }
131 - { msystem: MINGW64, cc_pkg: mingw-w64-x86_64-gcc }
132 - { msystem: CLANG32, cc_pkg: mingw-w64-clang-i686-clang }
133 - { msystem: CLANG64, cc_pkg: mingw-w64-clang-x86_64-clang }
134 - { msystem: CLANGARM64, options: --install-prerequisites }
139 - uses: actions/checkout@v3
141 fetch-depth: 0 # Need tags for tools/get-version-number
142 - uses: msys2/setup-msys2@v2
144 msystem: ${{matrix.msystem}}
154 - run: CFLAGS="$DEF_CFLAGS" ./tools/make-windows-release ${{matrix.options}}
155 - uses: actions/upload-artifact@v3
157 name: windows-${{matrix.msystem}}-bin
161 name: Fuzz with libFuzzer (${{matrix.target}} ${{matrix.sanitizer}})
168 sanitizer: --asan --ubsan
172 sanitizer: --asan --ubsan
176 sanitizer: --asan --ubsan
180 sanitizer: --asan --ubsan
181 runs-on: ubuntu-latest
183 - uses: actions/checkout@v3
184 - name: Install dependencies
187 sudo apt-get install -y clang $DEPENDENCIES
191 tools/libFuzzer/fuzz.sh --time=120 ${{matrix.sanitizer}} \