8000 PG-1464 Static Analyzer by artemgavrilov · Pull Request #339 · percona/postgres · GitHub
[go: up one dir, main page]

Skip to content

PG-1464 Static Analyzer #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

Draft
wants to merge 5 commits into
base: TDE_REL_17_STABLE
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
41 changes: 41 additions & 0 deletions .github/workflows/codechecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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: 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 contrib/pg_tde

- uses: actions/upload-artifact@v4
name: "CodeChecker Bug Reports"
with:
name: codechecker-report
path: ./reports
126 changes: 63 additions & 63 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
name: Code coverage
on:
pull_request:
push:
branches:
- TDE_REL_17_STABLE

env:
PGCTLTIMEOUT: 120 # Avoid failures on slow recovery

jobs:
collect:
name: Collect and upload
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: Build postgres
run: ci_scripts/make-build.sh debug --enable-coverage

- name: Setup kmip and vault
run: ci_scripts/setup-keyring-servers.sh

- name: Test postgres with TDE to generate coverage
run: ci_scripts/make-test.sh --tde-only

- name: Collect coverage data
run: find . -type f -name "*.c" ! -path '*libkmip*' | xargs -t gcov -abcfu
working-directory: contrib/pg_tde

- name: Upload coverage data to codecov.io
uses: codecov/codecov-action@v5
with:
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: contrib/pg_tde
files: "*.c.gcov"

- name: Report on test fail
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: coverage-testlog-tde
path: |
build/testrun
contrib/*/log
contrib/*/regression.diffs
contrib/*/regression.out
contrib/*/results
contrib/*/tmp_check
contrib/*/t/results
src/test/*/log
src/test/*/regression.diffs
src/test/*/regression.out
src/test/*/results
src/test/*/tmp_check
retention-days: 3
# name: Code coverage
# on:
# pull_request:
# push:
# branches:
# - TDE_REL_17_STABLE

# env:
# PGCTLTIMEOUT: 120 # Avoid failures on slow recovery

# jobs:
# collect:
# name: Collect and upload
# 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: Build postgres
# run: ci_scripts/make-build.sh debug --enable-coverage

# - name: Setup kmip and vault
# run: ci_scripts/setup-keyring-servers.sh

# - name: Test postgres with TDE to generate coverage
# run: ci_scripts/make-test.sh --tde-only

# - name: Collect coverage data
# run: find . -type f -name "*.c" ! -path '*libkmip*' | xargs -t gcov -abcfu
# working-directory: contrib/pg_tde

# - name: Upload coverage data to codecov.io
# uses: codecov/codecov-action@v5
# with:
# verbose: true
# token: ${{ secrets.CODECOV_TOKEN }}
# working-directory: contrib/pg_tde
# files: "*.c.gcov"

# - name: Report on test fail
# uses: actions/upload-artifact@v4
# if: ${{ failure() }}
# with:
# name: coverage-testlog-tde
# path: |
# build/testrun
# contrib/*/log
# contrib/*/regression.diffs
# contrib/*/regression.out
# contrib/*/results
# contrib/*/tmp_check
# contrib/*/t/results
# src/test/*/log
# src/test/*/regression.diffs
# src/test/*/regression.out
# src/test/*/results
# src/test/*/tmp_check
# retention-days: 3
54 changes: 27 additions & 27 deletions .github/workflows/pgindent.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: PgIndent
on:
pull_request:
workflow_dispatch:
# name: PgIndent
# on:
# pull_request:
# workflow_dispatch:

defaults:
run:
working-directory: ./src
# defaults:
# run:
# working-directory: ./src

jobs:
check:
name: Check
runs-on: ubuntu-24.04
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
path: 'src'
submodules: recursive
# jobs:
# check:
# name: Check
# runs-on: ubuntu-24.04
# steps:
# - name: Clone repository
# uses: actions/checkout@v4
# with:
# path: 'src'
# submodules: recursive

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

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

- name: Update typedefs
run: ci_scripts/dump-typedefs.sh
# - name: Update typedefs
# run: ci_scripts/dump-typedefs.sh

- name: Run pgindent
run: ci_scripts/run-pgindent.sh --check --diff
# - name: Run pgindent
# run: ci_scripts/run-pgindent.sh --check --diff

- name: Run pgperltidy
run: ci_scripts/run-pgperltidy.sh --assert-tidy --standard-error-output
# - name: Run pgperltidy
# run: ci_scripts/run-pgperltidy.sh --assert-tidy --standard-error-output
46 changes: 23 additions & 23 deletions .github/workflows/psp-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: PSP
on:
pull_request:
push:
branches:
- TDE_REL_17_STABLE
workflow_dispatch:
# name: PSP
# on:
# pull_request:
# push:
# branches:
# - TDE_REL_17_STABLE
# workflow_dispatch:

jobs:
build:
name: PSP
strategy:
matrix:
os: ['ubuntu-22.04']
compiler: [gcc, clang]
build_type: [debug,debugoptimized]
build_script: [make, meson]
uses: ./.github/workflows/psp-reusable.yml
with:
os: ${{ matrix.os }}
compiler: ${{ matrix.compiler }}
build_type: ${{ matrix.build_type }}
build_script: ${{ matrix.build_script }}
secrets: inherit
# jobs:
# build:
# name: PSP
# strategy:
# matrix:
# os: ['ubuntu-22.04']
# compiler: [gcc, clang]
# build_type: [debug,debugoptimized]
# build_script: [make, meson]
# uses: ./.github/workflows/psp-reusable.yml
# with:
# os: ${{ matrix.os }}
# compiler: ${{ matrix.compiler }}
# build_type: ${{ matrix.build_type }}
# build_script: ${{ matrix.build_script }}
# secrets: inherit
Loading
0