diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 959f1ec51..42016b56b 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -22,22 +22,24 @@ jobs: matrix: os: [ ubuntu-latest, windows-latest, - ubuntu-20.04, macos-latest, - macos-11 + ubuntu-20.04, + ubuntu-24.04, + macos-13 ] # ubuntu-18.04 does not work due to compile error on asio - # windows-2019 not included to spare free minutes + # windows-2019 not included to spare free minutes steps: - uses: actions/checkout@v4 - name: Prepare dependencies - run: | + run: | if [ "$RUNNER_OS" == "Linux" ]; then sudo apt-get update && \ sudo apt-get install -yq \ libasio-dev \ libssl-dev zlib1g-dev \ - cmake + cmake \ + g++ clang elif [ "$RUNNER_OS" == "Windows" ]; then VCPKG_DEFAULT_TRIPLET=x64-windows vcpkg install elif [ "$RUNNER_OS" == "macOS" ]; then @@ -84,6 +86,7 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest --output-on-failure -C ${{env.BUILD_TYPE}} + shell: bash - name: Generate coverage report if: matrix.os == 'ubuntu-latest' @@ -106,11 +109,16 @@ jobs: name: coveralls.json path: coveralls.json + - name: Package + working-directory: ${{github.workspace}}/build + run: cmake --build . --target package - #- name: Package + - uses: actions/upload-artifact@v4 + if: matrix.os == 'ubuntu-24.04' + with: + name: packages + path: ${{github.workspace}}/build/Crow-* + + #- name: Source package # working-directory: ${{github.workspace}}/build - # run: | - # cmake --build . --target ALL_BUILD && \ - # cmake --build . --target doc && \ - # cmake --build . --target package && \ - # cpack --config CPackSourceConfig.cmake + # run: cpack --config CPackSourceConfig.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index f02d9c489..bb36eb5ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,7 +163,16 @@ if(CROW_INSTALL) ) endif() -set(CPACK_GENERATOR "ZIP") +if(WIN32 AND NOT CYGWIN) + set(CPACK_GENERATOR NSIS ZIP) +endif(WIN32 AND NOT CYGWIN) +if(APPLE) + set(CPACK_GENERATOR DragNDrop TGZ) +endif(APPLE) +if (UNIX AND NOT APPLE AND NOT WIN32) + set(CPACK_GENERATOR DEB TGZ) +endif (UNIX AND NOT APPLE AND NOT WIN32) + set(CPACK_PACKAGE_NAME "Crow") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "CrowCpp") set(CPACK_PACKAGE_VENDOR "CrowCpp")