Skip to content

Static Analyzer - clang-analyzer #10

Static Analyzer - clang-analyzer

Static Analyzer - clang-analyzer #10

# Copyright (C) Markus Franz Xaver Johannes Oberhumer
name: 'Static Analyzer - clang-analyzer'
on:
schedule: [cron: '10 4 * * 3'] # run weekly Wednesday 04:10 UTC
workflow_dispatch:
env:
CMAKE_REQUIRED_QUIET: "OFF"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
jobs:
job-analyze-clang-analyzer: # uses cmake + make
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- container: 'alpine:3.16'
- container: 'alpine:3.17'
- container: 'alpine:3.18'
- container: 'alpine:edge'
- container: 'i386/alpine:3.18'
- container: 'i386/alpine:edge'
name: ${{ format('Analyze clang-analyzer {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- name: ${{ format('Install packages {0}', matrix.container) }}
run: 'apk update && apk upgrade && apk add clang clang-analyzer cmake g++ git make'
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
git submodule update --init
- name: 'Perform clang-analyzer scan-build Analysis Debug'
run: 'make build/analyze/clang-analyzer/debug'
- name: 'Perform clang-analyzer scan-build Analysis Release'
if: success() || failure() # run this step even if the previous step failed
run: 'make build/analyze/clang-analyzer/release'