]> wimlib.net Git - wimlib/blobdiff - .github/workflows/ci.yml
ci.yml: install the ntfs-3g package
[wimlib] / .github / workflows / ci.yml
index 02fa6ea5b3d254ac00274fb9711c7530ada9b0b5..7fc15de726e4a8d8ecf569dfb17432091d1f533f 100644 (file)
@@ -2,7 +2,7 @@ name: CI
 on: [pull_request, push]
 env:
   DEF_CFLAGS: -O2 -g -Wall -Werror
-  DEPENDENCIES: autoconf automake libtool pkg-config libxml2-dev libfuse-dev ntfs-3g-dev
+  DEPENDENCIES: autoconf automake libtool pkgconf libfuse-dev ntfs-3g-dev ntfs-3g
 
 jobs:
   gcc-build-and-test:
@@ -54,7 +54,7 @@ jobs:
       run: |
         sudo dpkg --add-architecture i386
         sudo apt-get update
-        sudo apt-get install -y gcc-multilib $DEPENDENCIES libxml2-dev:i386
+        sudo apt-get install -y gcc-multilib $DEPENDENCIES
     - run: ./bootstrap
     - run: ./configure CC=gcc CFLAGS="-m32 $DEF_CFLAGS" --without-fuse --without-ntfs-3g
     - run: make -j8 check V=1
@@ -76,7 +76,7 @@ jobs:
         sudo apt-get update
         sudo apt-get install -y clang $DEPENDENCIES
     - run: ./bootstrap
-    - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS -fsanitize=address"
+    - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS -fsanitize=address -fno-sanitize-recover=address"
     - run: make -j8 check V=1
     - uses: actions/upload-artifact@v3
       if: failure()
@@ -94,7 +94,7 @@ jobs:
         sudo apt-get update
         sudo apt-get install -y clang $DEPENDENCIES
     - run: ./bootstrap
-    - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS -fsanitize=undefined"
+    - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
     - run: make -j8 check V=1
     - uses: actions/upload-artifact@v3
       if: failure()
@@ -109,7 +109,7 @@ jobs:
     - uses: actions/checkout@v3
     - name: Install dependencies
       run: |
-        brew install autoconf automake libtool pkg-config libxml2
+        brew install autoconf automake libtool pkg-config
     - run: ./bootstrap
     - run: ./configure CFLAGS="$DEF_CFLAGS" --without-fuse --without-ntfs-3g
     - run: make -j8 check V=1
@@ -127,8 +127,10 @@ jobs:
     strategy:
       matrix:
         include:
-        - { sys: mingw32, env: i686 }
-        - { sys: mingw64, env: x86_64 }
+        - { msystem: mingw32, cc_pkg: mingw-w64-i686-gcc }
+        - { msystem: mingw64, cc_pkg: mingw-w64-x86_64-gcc }
+        - { msystem: clang32, cc_pkg: mingw-w64-clang-i686-clang }
+        - { msystem: clang64, cc_pkg: mingw-w64-clang-x86_64-clang }
     defaults:
       run:
         shell: msys2 {0}
@@ -136,16 +138,48 @@ jobs:
     - uses: actions/checkout@v3
     - uses: msys2/setup-msys2@v2
       with:
-        msystem: ${{matrix.sys}}
+        msystem: ${{matrix.msystem}}
         update: true
         install: >
           autoconf
           automake
+          git
           libtool
-          pkg-config
           make
-          mingw-w64-${{matrix.env}}-cc
-          mingw-w64-${{matrix.env}}-libxml2
+          ${{matrix.cc_pkg}}
+          pkgconf
+    - run: CFLAGS="$DEF_CFLAGS" ./tools/make-windows-release
+
+  fuzz-with-libFuzzer:
+    name: Fuzz with libFuzzer (${{matrix.target}} ${{matrix.sanitizer}})
+    strategy:
+      matrix:
+        include:
+        - target: wim
+          sanitizer:
+        - target: wim
+          sanitizer: --asan --ubsan
+        - target: xml
+          sanitizer:
+        - target: xml
+          sanitizer: --asan --ubsan
+        - target: compress
+          sanitizer:
+        - target: compress
+          sanitizer: --asan --ubsan
+        - target: decompress
+          sanitizer:
+        - target: decompress
+          sanitizer: --asan --ubsan
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v3
+    - name: Install dependencies
+      run: |
+        sudo apt-get update
+        sudo apt-get install -y clang $DEPENDENCIES
     - run: ./bootstrap
-    - run: ./configure CFLAGS="$DEF_CFLAGS" --without-fuse --without-ntfs-3g
-    - run: make -j8
+    - name: Fuzz
+      run: |
+        tools/libFuzzer/fuzz.sh --time=120 ${{matrix.sanitizer}} \
+            ${{matrix.target}}