Skip to content

PG-1464 CodeChecker integration #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/codechecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CodeChecker
on:
pull_request:
push:
branches:
- TDE_REL_17_STABLE

env:
CC: clang
LD: clang

jobs:
run:
name: Run
runs-on: ubuntu-22.04
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies
run: ci_scripts/ubuntu-deps.sh

- name: Install CodeChecker
run: |
## CodeChecker version should match version installed on server side.
pip3 install codechecker==6.21

- name: Configure CodeChecker
run: |
echo "::add-mask::${{ secrets.CODECHECKER_ENDPOINT }}"
echo "::add-mask::${{ secrets.CODECHECKER_ENGINEERING_CREDENTIALS }}"
cat > ~/.codechecker.passwords.json << EOL
{
"client_autologin": true,
"credentials": {
"${{secrets.CODECHECKER_ENDPOINT}}": "${{secrets.CODECHECKER_ENGINEERING_CREDENTIALS}}"
}
}
EOL

- name: Set cc alternative
run: |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
sudo update-alternatives --set cc /usr/bin/clang

- name: Build postgres
run: ci_scripts/meson-build.sh debug

- name: Run CodeChecker
run: CodeChecker analyze build/compile_commands.json --enable sensitive --output ./reports --file ${{ github.workspace }}/contrib/pg_tde

- name: Upload CodeChecker reports
run: |
CodeChecker store ./reports --url=https://codechecker.percona.com/pg_tde --name=${GITHUB_REF_NAME} --tag=${GITHUB_SHA} --force