ci: don't build for linux/386 #270
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Static Code Analysis | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
paths: | |
- "CMakeLists.txt" | |
- "src/*.c" | |
- "src/*.h" | |
- "src/*.h.in" | |
- "cmake/*" | |
- ".github/workflows/static-analysis.yml" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
clang-analyze: | |
name: Build | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') || github.event_name != 'push' }} | |
env: | |
CC: clang | |
CCC_CC: clang | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- name: Install dependencies | |
run: sudo apt-get -qq update && sudo apt-get install -y libev-dev clang-tools | |
- name: Install libassh | |
run: | | |
mkdir libassh | |
cd libassh | |
wget -q http://download.savannah.nongnu.org/releases/libassh/libassh-1.0.tar.gz -O - | tar -xz --strip-components=1 -f - | |
./configure --quiet --enable-silent-rules --disable-client --disable-examples --without-gcrypt --without-openssl --without-sodium --without-zlib --disable-dependency-tracking | |
make -j2 | |
sudo make install | |
- name: Configure | |
run: scan-build cmake -S . -B build | |
- name: Build | |
run: scan-build --force-analyze-debug-code -sarif --status-bugs -o ../results cmake --build build | |
continue-on-error: true | |
id: build | |
- name: Upload scan results | |
uses: github/codeql-action/upload-sarif@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2 | |
- name: Set exit code | |
run: exit 1 | |
if: steps.build.outcome == 'failure' |