Skip to content
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

Modify repository structure for preparing public #27

Merged
merged 2 commits into from
Sep 18, 2023
Merged
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
93 changes: 43 additions & 50 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
strategy:
fail-fast: false
matrix:
container-tag: [ubuntu-20.04, ubuntu-22.04]
os: [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 }}
image: ghcr.io/project-tsurugi/oltp-sandbox:${{ matrix.os }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
Expand All @@ -21,74 +21,67 @@ jobs:
run:
shell: bash
env:
CCACHE_DIR: ${{ vars.ccache_dir }}
CCACHE_CONFIGPATH: ${{ vars.ccache_dir }}/ccache.conf
CCACHE_DIR: ${{ vars.ccache_dir }}/${{ matrix.os }}

steps:
- id: Checkout
name: Checkout
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GHA_PAT }}
submodules: true

- 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: CMake_Build
name: 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=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target all --clean-first -- -j8
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
cmake --build . --target all --clean-first

- id: CTest
name: CTest
continue-on-error: false
- name: CTest
env:
GTEST_OUTPUT: xml
ASAN_OPTIONS: detect_stack_use_after_return=true
run: |
cd build
ctest --verbose

- id: Clang-Tidy
name: Clang-Tidy
- name: Verify
uses: project-tsurugi/tsurugi-annotations-action@v1
if: always()
with:
matrix: ${{ toJson(matrix) }}

Analysis:
runs-on: [self-hosted, docker]
timeout-minutes: 30
container:
image: ghcr.io/project-tsurugi/oltp-sandbox:ubuntu-22.04
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v3

- name: CMake_Generate
run: |
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..

- 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)/.*\.h$' $(pwd)'/src/.*' 2>&1 | awk '!a[$0]++{print > "build/clang-tidy.log"}'
if: matrix.container-tag == 'ubuntu-22.04'

- id: Doxygen
name: Doxygen
- name: Doxygen
run: |
cd build
make doxygen 2> >(tee doxygen-error.log)
if: matrix.container-tag == 'ubuntu-22.04'
ninja doxygen 2> >(tee doxygen-error.log)

- id: Generate_Annotations
name: Generate_Annotations
uses: ./.github/actions/tsurugi-annotations-action
- name: Verify
uses: project-tsurugi/tsurugi-annotations-action@v1
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 }}
4 changes: 3 additions & 1 deletion third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
add_subdirectory(googletest EXCLUDE_FROM_ALL)
if(BUILD_TESTS)
add_subdirectory(googletest EXCLUDE_FROM_ALL)
endif()