diff --git a/.github/workflows/clang-analyze.yml b/.github/workflows/clang-analyze.yml new file mode 100644 index 0000000..46eacfc --- /dev/null +++ b/.github/workflows/clang-analyze.yml @@ -0,0 +1,28 @@ +name: Clang Analyze + +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Get build dependencies + run: | + sudo apt-get install -qq -y --no-install-recommends clang-tools + sudo apt-get build-dep -qq -y . + + - name: Analyze + run: | + scan-build -o clang-analyze/ make + + - name: Store artifacts + uses: actions/upload-artifact@v2 + with: + name: Clang Analyze results + path: clang-analyze/ diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml new file mode 100644 index 0000000..4d9ea36 --- /dev/null +++ b/.github/workflows/cppcheck.yml @@ -0,0 +1,19 @@ +name: Cppcheck + +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Get tool + run: sudo apt-get install -qq -y --no-install-recommends cppcheck + + - name: Analyze + run: cppcheck -q --enable=all src diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml new file mode 100644 index 0000000..e0dc2b0 --- /dev/null +++ b/.github/workflows/sanitizers.yml @@ -0,0 +1,24 @@ +name: Sanitizers + +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-20.04 + + env: + FLAGS: "-fsanitize=address -fsanitize=leak -fsanitize=undefined" + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Get build dependencies + run: | + sudo apt-get build-dep -qq -y . + + - name: Build with sanitizers enabled + run: | + CFLAGS="$FLAGS" LDFLAGS="$FLAGS" make test