Skip to content

Commit

Permalink
ci: setup cpp
Browse files Browse the repository at this point in the history
Signed-off-by: msclock <msclock@qq.com>
  • Loading branch information
msclock committed Mar 6, 2024
1 parent fbdff6e commit 18e7f47
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 32 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/pre-commit-autoupdate.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy PR previews

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

concurrency:
group: preview-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pages-preview:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: gcc
cmake: true
ninja: true
vcpkg: true
ccache: true
doxygen: true
graphviz: true
gcovr: true
python: true

- name: Install docs dependencies
run: |
pip install -r docs/requirements.txt
- name: Configure
env:
VCPKG_ROOT: /home/runner/vcpkg
run: cmake -S . --preset=x64-Debug-GNUC -DBUILD_TESTING=OFF -DCODE_COVERAGE=OFF

- name: Build Docs
run: cmake --build out/build/x64-Debug-GNUC --target ss-cpp-docs

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./docs/_build/html
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ include(cmake-modules/build/Ccache)
include(cmake-modules/build/LinkOptimization)
include(cmake-modules/test/Default)
include(cmake-modules/test/GoogleTest)
include(cmake-modules/test/Coverage)
include(cmake-modules/test/Sanitizer)
include(cmake-modules/test/Valgrind)
include(cmake-modules/install/Common)
Expand Down
2 changes: 2 additions & 0 deletions cmake/ConfigureCoverage.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include_guard(GLOBAL)

include(cmake-modules/test/Coverage)

# cmake-format: off
add_code_coverage_all_targets(
EXCLUDE
Expand Down

0 comments on commit 18e7f47

Please sign in to comment.