diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 6c07844..69f4045 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -13,6 +13,8 @@ jobs: unit-tests: name: "Build ${{ matrix.build_type }} with ${{ matrix.compiler }}" runs-on: ubuntu-latest + env: + CALF_LOG_DIR: ${{ github.workspace }}/capiocl_logs strategy: fail-fast: false matrix: @@ -63,11 +65,28 @@ jobs: shell: bash run: CAPIO_CL_tests --gtest_break_on_failure --gtest_print_time=1 + - name: Zip logs + if: always() + run: | + if [ -d "capiocl_logs" ]; then + cmake -E tar cf capiocl_logs.zip --format=zip capiocl_logs + fi + + - name: Upload logs artifact + if: always() + uses: actions/upload-artifact@v7 + with: + name: capiocl-logs-${{ matrix.build_type }}-${{ strategy.job-index }} + path: capiocl_logs.zip + retention-days: 1 + if-no-files-found: ignore upload-to-codecov: name: "compute Codecov" needs: [ "unit-tests"] runs-on: ubuntu-latest + env: + CALF_LOG_DIR: ${{ github.workspace }}/capiocl_logs steps: - uses: actions/checkout@v7 @@ -96,6 +115,22 @@ jobs: shell: bash run: CAPIO_CL_tests --gtest_break_on_failure --gtest_print_time=1 + - name: Zip logs + if: always() + run: | + if [ -d "capiocl_logs" ]; then + cmake -E tar cf capiocl_logs.zip --format=zip capiocl_logs + fi + + - name: Upload logs artifact + if: always() + uses: actions/upload-artifact@v7 + with: + name: capiocl-logs-coverage + path: capiocl_logs.zip + retention-days: 1 + if-no-files-found: ignore + - name: "Generate coverage report" run: | pip install --upgrade gcovr @@ -170,4 +205,4 @@ jobs: with: source: ${{matrix.path}} extensions: 'h,cpp,c' - clangFormatVersion: 20 \ No newline at end of file + clangFormatVersion: 20 diff --git a/.github/workflows/python-bindings.yml b/.github/workflows/python-bindings.yml index 66b7c10..bd335f0 100644 --- a/.github/workflows/python-bindings.yml +++ b/.github/workflows/python-bindings.yml @@ -20,6 +20,7 @@ jobs: runs-on: ${{ matrix.on }} env: INSTALL_PREFIX: "/usr/local" + CALF_LOG_DIR: ${{ github.workspace }}/capiocl_logs steps: - name: "Checkout repository" @@ -68,6 +69,22 @@ jobs: run: | pytest -k "not test_home_node" -v tests/python/test_* + - name: "Zip CALF logs" + if: always() + run: | + if [ -d "capiocl_logs" ]; then + cmake -E tar cf capiocl_logs.zip --format=zip capiocl_logs + fi + + - name: "Upload CALF logs" + if: always() + uses: actions/upload-artifact@v7 + with: + name: ${{ format('capiocl-logs-{0}-{1}', matrix.on, matrix.python) }} + path: capiocl_logs.zip + retention-days: 1 + if-no-files-found: ignore + - name: "Generate coverage report" if: ${{ startsWith(matrix.on, 'ubuntu-') }} diff --git a/CMakeLists.txt b/CMakeLists.txt index efca4b8..ac6a366 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,9 +60,11 @@ FetchContent_Declare( FetchContent_Declare( calf GIT_REPOSITORY https://github.com/High-Performance-IO/calf.git - GIT_TAG v0.1.1 + GIT_TAG v0.2.0 ) +set(CALF_PROTOBUF ON CACHE BOOL "" FORCE) + # JSONCONS build flags set(JSONCONS_BUILD_TESTS OFF CACHE BOOL "" FORCE) set(JSONCONS_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) @@ -161,6 +163,7 @@ endif () calf_enable_log(libcapio_cl $,ON,OFF>) calf_set_component(libcapio_cl "capiocl") calf_set_default_log_dir(libcapio_cl "./capiocl_logs") +target_link_libraries(libcapio_cl PRIVATE calf::protobuf) target_include_directories(libcapio_cl PRIVATE ${CALF_SOURCE_DIR}) #####################################