Skip to content

exclude generated files from clang-tidy. #160

exclude generated files from clang-tidy.

exclude generated files from clang-tidy. #160

Workflow file for this run

name: Mizugaki-CI
on: [push, pull_request, workflow_dispatch]
jobs:
Build:
strategy:
fail-fast: false
matrix:
container-tag: [ubuntu-20.04, ubuntu-22.04]
runs-on: [self-hosted, docker]
timeout-minutes: 30
container:
image: ghcr.io/project-tsurugi/oltp-sandbox:${{ matrix.container-tag }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
volumes:
- ${{ vars.ccache_dir }}:${{ vars.ccache_dir }}
defaults:
run:
shell: bash
env:
CCACHE_DIR: ${{ vars.ccache_dir }}
steps:
- id: Checkout
name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GHA_PAT }}
- id: Checkout_Actions
name: Checkout_Actions
uses: actions/checkout@v3
with:
repository: project-tsurugi/tsurugi-github-actions
path: .github/actions
ref: master
submodules: recursive
token: ${{ secrets.GHA_PAT }}
- id: Install_takatori_in_yugawara
name: Install_takatori_in_yugawara
run: |
cd third_party/yugawara/third_party/takatori
mkdir -p build
cd build
rm -f CMakeCache.txt
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j8
- id: Install_hopscotch-map
name: Install_hopscotch-map
run: |
cd third_party/hopscotch-map
mkdir -p ../../build-hopscotch-map
cd ../../build-hopscotch-map
rm -f CMakeCache.txt
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ../third_party/hopscotch-map
cmake --build . --target install -- -j8
- id: Install_yugawara
name: Install_yugawara
run: |
cd third_party/yugawara
mkdir -p build
cd build
rm -f CMakeCache.txt
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j8
- id: Install_shakujo
name: Install_shakujo
run: |
cd third_party/shakujo
mkdir -p build
cd build
rm -f CMakeCache.txt
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j8
- id: CMake_Build
name: CMake_Build
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local -DCMAKE_PREFIX_PATH="${{ matrix.additional_prefix_path }};${GITHUB_WORKSPACE}/.local" ..
cmake --build . --target all --clean-first -- -j8
- id: CTest
name: CTest
continue-on-error: false
env:
GTEST_OUTPUT: xml
ASAN_OPTIONS: detect_stack_use_after_return=true
run: |
cd build
ctest --verbose
- id: Clang-Tidy
name: Clang-Tidy
run: |
python tools/bin/run-clang-tidy.py -quiet -export-fixes=build/clang-tidy-fix.yaml -p build -extra-arg=-Wno-unknown-warning-option -header-filter=$(pwd)'/(include|src|examples)/.*\.h$' -exclude='sql_(parser|scanner)\.cpp$' $(pwd)'/(src|examples)/.*' 2>&1 | awk '!a[$0]++{print > "build/clang-tidy.log"}'
if: matrix.container-tag == 'ubuntu-22.04'
- id: Doxygen
name: Doxygen
run: |
cd build
make doxygen 2> >(tee doxygen-error.log)
if: matrix.container-tag == 'ubuntu-22.04'
- id: Generate_Annotations
name: Generate_Annotations
uses: ./.github/actions/tsurugi-annotations-action
if: always()
with:
matrix: ${{ toJson(matrix) }}
- id: Notify_Slack
name: Notify_Slack
uses: ./.github/actions/tsurugi-slack-action
if: always() && (github.event.pull_request.draft == false) && (contains(github.ref, '/tags/') || contains(github.ref, '/pull/') || contains(github.ref, '/heads/master'))
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}
with:
kind: 'job-result'
channel: 'tsurugi-build'
status: ${{ job.status }}
step_context: ${{ toJson(steps) }}
username: ${{ github.workflow }}