Skip to content

refactor: use icu for 4 to 2 byte character conversions #602

refactor: use icu for 4 to 2 byte character conversions

refactor: use icu for 4 to 2 byte character conversions #602

name: Run Static Analysis
on:
workflow_dispatch:
pull_request:
branches:
- '**'
paths-ignore:
- '**/*.md'
- '**/*.jpg'
- '**/*.png'
- '**/README.*'
- '**/LICENSE.*'
- 'docs/**'
- 'ISSUE_TEMPLATE/**'
env:
BUILD_CONFIG: Release
permissions:
contents: read
jobs:
static-analysis:
name: Static Analysis
runs-on: macos-latest
steps:
- name: Checkout aws-advanced-odbc-wrapper
uses: actions/checkout@v6
- name: Install Build Dependencies
run: |
brew update && brew upgrade && brew cleanup
brew install cmake unixodbc curl openssl zlib cppcheck llvm icu4c
python3 -m venv ./venv
source ./venv/bin/activate
python3 -m pip install CodeChecker==6.24.4
- name: Retrieve AWS SDK for C++ Cache
id: cache-aws-sdk
uses: actions/cache@v5
with:
path: aws_sdk/install
key: ${{ runner.os }}-aws-sdk-cpp-${{env.BUILD_CONFIG}}
- name: Build AWS SDK for C++
if: ${{steps.cache-aws-sdk.outputs.cache-hit != 'true'}}
run: |
./scripts/compile_aws_sdk_unix.sh ${{env.BUILD_CONFIG}} "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/"
- name: Build aws-advanced-odbc-wrapper
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIG}} \
-DBUILD_UNICODE=OFF -DBUILD_UNIT_TEST=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=1
- name: Run static analysis
continue-on-error: true
run: |
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
whereis clang-tidy
source ./venv/bin/activate
CodeChecker analyze -i ./.clang-skipfile -o ./reports --analyzer-config clang-tidy:take-config-from-directory=true -d cppcheck ./build/compile_commands.json
- name: Print static analysis
run: |
source ./venv/bin/activate
CodeChecker parse --print-steps ./reports