Skip to content

Commit

Permalink
Merge pull request #27 from project-tsurugi/ci-sb-prepare-public
Browse files Browse the repository at this point in the history
Modify repository structure for preparing public
  • Loading branch information
akirakw authored Sep 18, 2023
2 parents 883938c + c4ef99b commit d8e5364
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 51 deletions.
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()

0 comments on commit d8e5364

Please sign in to comment.