From 6c1c23ad196f5e42e9174c0231885422b1e2fca4 Mon Sep 17 00:00:00 2001 From: Kataev Victor Date: Wed, 20 Jul 2022 10:10:33 +0000 Subject: [PATCH 1/5] Fix ci --- .github/workflows/test-linux.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 8e54992..3558cdb 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -15,36 +15,41 @@ on: branches: - master paths: - - '.github/workflows/test-cpp-linux.yml' + - '.github/workflows/test-linux.yml' - 'benchmarks/**' - 'examples/**' - 'sf_compressor/**' - 'sources/**' - 'tests/**' - 'CMakeLists.txt' + jobs: deploy: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: build_type: [ Debug, Release ] + os: [ ubuntu-latest, windows-latest ] + steps: - uses: actions/checkout@v2 - with: - submodules: recursive + - name: Build tests, benchmarks and examples run: | mkdir build cd build cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DSFC_BUILD_TESTS=ON -DSFC_BUILD_BENCHMARKS=ON -DSFC_BUILD_EXAMPLES=ON .. cmake --build . + - name: Run tests run: | cd build ctest --output-on-failure + - name: Install sf_compressor run: | cd build sudo cmake --install . + - name: Check cmake target installation run: cmake --find-package -DNAME=sf_compressor -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST \ No newline at end of file From 18800a3e4faf5ad1f7aa40156fc3a417f3879c47 Mon Sep 17 00:00:00 2001 From: Kataev Victor Date: Wed, 20 Jul 2022 11:20:06 +0000 Subject: [PATCH 2/5] Turn on c++20 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e6d4d9..8f5807e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,8 @@ set(SFC_TARGET_NAME ${PROJECT_NAME}) # Create sfc target add_library(${SFC_TARGET_NAME} sources/sf_compressor.cc) -target_compile_features(${SFC_TARGET_NAME} PUBLIC cxx_std_17) +target_compile_features(${SFC_TARGET_NAME} PUBLIC cxx_std_20) +set_target_properties(${SFC_TARGET_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON) # Include paths target_include_directories(${SFC_TARGET_NAME} PUBLIC From 8e50643e7187a02b5ee1e7f63f109816354abda0 Mon Sep 17 00:00:00 2001 From: Kataev Victor Date: Wed, 20 Jul 2022 11:53:37 +0000 Subject: [PATCH 3/5] Bump up Catch to 3.0.1 --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f5807e..b074ff2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,9 +24,10 @@ include(FetchContent) if (SFC_BUILD_TESTS OR SFC_BUILD_BENCHMARKS) FetchContent_Declare( Catch2 - GIT_REPOSITORY https://github.com/catchorg/Catch2.git - GIT_TAG v3.0.0-preview3) - + URL https://github.com/catchorg/Catch2/archive/refs/tags/v3.0.1.tar.gz + URL_HASH + SHA256=8c4173c68ae7da1b5b505194a0c2d6f1b2aef4ec1e3e7463bde451f26bbaf4e7 + ) FetchContent_MakeAvailable(Catch2) list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras) From abb30d9c73a0256792333a2c7a0575437a27262c Mon Sep 17 00:00:00 2001 From: Kataev Victor Date: Wed, 20 Jul 2022 11:55:17 +0000 Subject: [PATCH 4/5] Save --- .github/workflows/test-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 3558cdb..d00372b 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -49,7 +49,7 @@ jobs: - name: Install sf_compressor run: | cd build - sudo cmake --install . + cmake --install . - name: Check cmake target installation run: cmake --find-package -DNAME=sf_compressor -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST \ No newline at end of file From 366c29794276952e0e3da535e79d2304423ff6a9 Mon Sep 17 00:00:00 2001 From: Kataev Victor Date: Wed, 20 Jul 2022 13:28:17 +0000 Subject: [PATCH 5/5] Save --- .github/workflows/test-linux.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index d00372b..e011b8c 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -47,9 +47,11 @@ jobs: ctest --output-on-failure - name: Install sf_compressor + if: matrix.os == 'ubuntu-latest' run: | cd build - cmake --install . + sudo cmake --install . - name: Check cmake target installation + if: matrix.os == 'ubuntu-latest' run: cmake --find-package -DNAME=sf_compressor -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST \ No newline at end of file