1name: smatch 2 3on: 4 push: 5 pull_request: 6 7concurrency: 8 group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 9 cancel-in-progress: true 10 11jobs: 12 smatch: 13 runs-on: ubuntu-24.04 14 steps: 15 - name: Checkout smatch 16 uses: actions/checkout@v4 17 with: 18 repository: error27/smatch 19 ref: master 20 path: smatch 21 - name: Install smatch dependencies 22 run: | 23 sudo apt-get install -y llvm gcc make sqlite3 libsqlite3-dev libdbd-sqlite3-perl libssl-dev libtry-tiny-perl 24 - name: Make smatch 25 run: | 26 cd $GITHUB_WORKSPACE/smatch 27 make -j$(nproc) 28 - name: Checkout OpenZFS 29 uses: actions/checkout@v4 30 with: 31 ref: ${{ github.event.pull_request.head.sha }} 32 path: zfs 33 - name: Install OpenZFS dependencies 34 run: | 35 cd $GITHUB_WORKSPACE/zfs 36 sudo apt-get purge -y snapd google-chrome-stable firefox 37 ONLY_DEPS=1 .github/workflows/scripts/qemu-3-deps-vm.sh ubuntu24 38 - name: Autogen.sh OpenZFS 39 run: | 40 cd $GITHUB_WORKSPACE/zfs 41 ./autogen.sh 42 - name: Configure OpenZFS 43 run: | 44 cd $GITHUB_WORKSPACE/zfs 45 ./configure --enable-debug 46 - name: Make OpenZFS 47 run: | 48 cd $GITHUB_WORKSPACE/zfs 49 make -j$(nproc) CHECK="$GITHUB_WORKSPACE/smatch/smatch" CC=$GITHUB_WORKSPACE/smatch/cgcc | tee $GITHUB_WORKSPACE/smatch.log 50 - name: Smatch results log 51 run: | 52 grep -E 'error:|warn:|warning:' $GITHUB_WORKSPACE/smatch.log 53