Skip to content

Commit aa89460

Browse files
committed
addad package building
1 parent 8510b55 commit aa89460

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

.github/workflows/build_and_test.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,24 @@ jobs:
2222
matrix:
2323
os: [ ubuntu-latest,
2424
windows-latest,
25-
ubuntu-20.04,
2625
macos-latest,
27-
macos-11
26+
ubuntu-20.04,
27+
ubuntu-24.04,
28+
macos-13
2829
]
2930
# ubuntu-18.04 does not work due to compile error on asio
30-
# windows-2019 not included to spare free minutes
31+
# windows-2019 not included to spare free minutes
3132
steps:
3233
- uses: actions/checkout@v4
3334
- name: Prepare dependencies
34-
run: |
35+
run: |
3536
if [ "$RUNNER_OS" == "Linux" ]; then
3637
sudo apt-get update && \
3738
sudo apt-get install -yq \
3839
libasio-dev \
3940
libssl-dev zlib1g-dev \
40-
cmake
41+
cmake \
42+
g++ clang
4143
elif [ "$RUNNER_OS" == "Windows" ]; then
4244
VCPKG_DEFAULT_TRIPLET=x64-windows vcpkg install
4345
elif [ "$RUNNER_OS" == "macOS" ]; then
@@ -84,6 +86,7 @@ jobs:
8486
# Execute tests defined by the CMake configuration.
8587
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
8688
run: ctest --output-on-failure -C ${{env.BUILD_TYPE}}
89+
shell: bash
8790

8891
- name: Generate coverage report
8992
if: matrix.os == 'ubuntu-latest'
@@ -106,11 +109,16 @@ jobs:
106109
name: coveralls.json
107110
path: coveralls.json
108111

112+
- name: Package
113+
working-directory: ${{github.workspace}}/build
114+
run: cmake --build . --target package
109115

110-
#- name: Package
116+
- uses: actions/upload-artifact@v4
117+
if: matrix.os == 'ubuntu-24.04'
118+
with:
119+
name: packages
120+
path: ${{github.workspace}}/build/Crow-*
121+
122+
#- name: Source package
111123
# working-directory: ${{github.workspace}}/build
112-
# run: |
113-
# cmake --build . --target ALL_BUILD && \
114-
# cmake --build . --target doc && \
115-
# cmake --build . --target package && \
116-
# cpack --config CPackSourceConfig.cmake
124+
# run: cpack --config CPackSourceConfig.cmake

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,16 @@ if(CROW_INSTALL)
163163
)
164164
endif()
165165

166-
set(CPACK_GENERATOR "ZIP")
166+
if(WIN32 AND NOT CYGWIN)
167+
set(CPACK_GENERATOR NSIS ZIP)
168+
endif(WIN32 AND NOT CYGWIN)
169+
if(APPLE)
170+
set(CPACK_GENERATOR DragNDrop TGZ)
171+
endif(APPLE)
172+
if (UNIX AND NOT APPLE AND NOT WIN32)
173+
set(CPACK_GENERATOR DEB TGZ)
174+
endif (UNIX AND NOT APPLE AND NOT WIN32)
175+
167176
set(CPACK_PACKAGE_NAME "Crow")
168177
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "CrowCpp")
169178
set(CPACK_PACKAGE_VENDOR "CrowCpp")

0 commit comments

Comments
 (0)