-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,11 @@ jobs: | |
version: "17.0" | ||
directory: ${{ runner.temp }}/llvm | ||
- run: pip install conan | ||
- name: Setup .NET Core # Required to execute ReportGenerator | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.x | ||
dotnet-quality: 'ga' | ||
|
||
- name: Install sonar-scanner and build-wrapper | ||
uses: SonarSource/sonarcloud-github-c-cpp@v2 | ||
|
@@ -65,14 +70,29 @@ jobs: | |
run: | | ||
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build --preset conan-${{ env.conan_preset }} | ||
- name: Template coverage | ||
run: | | ||
wget https://github.com/petiaccja/TemplateCoverage/releases/download/v1.3.0/TemplateCoverage_Linux_x86_64.zip | ||
unzip TemplateCoverage_Linux_x86_64.zip | ||
chmod +x ./TemplateCoverage_Linux_x86_64/template-coverage | ||
export RESOURCE_DIR=$(clang++ -print-resource-dir) | ||
python3 ./TemplateCoverage_Linux_x86_64/run_on_compile_commands.py -p ${{github.workspace}}/build/${{env.conan_preset}}/compile_commands.json ./TemplateCoverage_Linux_x86_64/template-coverage -- --format=lcov --out-file=${{github.workspace}}/template_coverage.info -extra-arg=-resource-dir=$RESOURCE_DIR | ||
- name: Test & code coverage | ||
working-directory: ${{github.workspace}}/build/${{ env.conan_preset }}/bin | ||
shell: bash | ||
run: | | ||
./test --reporter junit --out ${{github.workspace}}/tests.xml | ||
llvm-profdata merge -sparse default.profraw -o coverage.profdata | ||
llvm-cov show ./test -instr-profile=coverage.profdata > ${{github.workspace}}/coverage.txt | ||
llvm-cov export -format=lcov -object ./test -instr-profile=coverage.profdata > ${{github.workspace}}/test_coverage.info | ||
- name: Merge coverage reports | ||
uses: danielpalme/[email protected] | ||
with: | ||
reports: template_coverage.info;test_coverage.info | ||
targetdir: coverage | ||
reporttypes: SonarQube | ||
|
||
- name: Run sonar-scanner | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,35 @@ | ||
add_library(asyncpp-headers INTERFACE) | ||
|
||
|
||
target_include_directories(asyncpp-headers INTERFACE "${CMAKE_CURRENT_LIST_DIR}/..") | ||
target_include_directories(asyncpp-headers INTERFACE "${CMAKE_CURRENT_LIST_DIR}/..") | ||
|
||
|
||
target_sources(asyncpp-headers | ||
INTERFACE FILE_SET headers TYPE HEADERS FILES | ||
container/atomic_collection.hpp | ||
container/atomic_deque.hpp | ||
container/atomic_item.hpp | ||
container/atomic_stack.hpp | ||
memory/rc_ptr.hpp | ||
testing/interleaver.hpp | ||
testing/suspension_point.hpp | ||
threading/spinlock.hpp | ||
threading/cache.hpp | ||
concepts.hpp | ||
event.hpp | ||
generator.hpp | ||
join.hpp | ||
lock.hpp | ||
mutex.hpp | ||
promise.hpp | ||
scheduler.hpp | ||
semaphore.hpp | ||
shared_mutex.hpp | ||
sleep.hpp | ||
stream.hpp | ||
task.hpp | ||
thread_pool.hpp | ||
) | ||
|
||
|
||
set_target_properties(asyncpp-headers PROPERTIES VERIFY_INTERFACE_HEADER_SETS ON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
#include <cassert> | ||
#include <coroutine> | ||
#include <optional> | ||
#include <mutex> | ||
#include <utility> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters