Skip to content

Commit dc0acf7

Browse files
committed
added package building and upload
platforms updated
1 parent 94a011b commit dc0acf7

File tree

2 files changed

+29
-14
lines changed

2 files changed

+29
-14
lines changed

‎.github/workflows/build_and_test.yml‎

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ on:
55
branches: [ "v1.2" ]
66

77
env:
8-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
98
BUILD_TYPE: Release
109
COVERALLS_PULL_REQUEST: ${{ github.event.number }}
11-
#COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
1210

1311
jobs:
1412
build:
@@ -21,22 +19,24 @@ jobs:
2119
matrix:
2220
os: [ ubuntu-latest,
2321
windows-latest,
24-
ubuntu-20.04,
2522
macos-latest,
26-
macos-11
23+
ubuntu-20.04,
24+
ubuntu-24.04,
25+
macos-13
2726
]
2827
# ubuntu-18.04 does not work due to compile error on asio
29-
# windows-2019 not included to spare free minutes
28+
# windows-2019 not included to spare free minutes
3029
steps:
3130
- uses: actions/checkout@v4
3231
- name: Prepare dependencies
33-
run: |
32+
run: |
3433
if [ "$RUNNER_OS" == "Linux" ]; then
3534
sudo apt-get update && \
3635
sudo apt-get install -yq \
3736
libasio-dev \
3837
libssl-dev zlib1g-dev \
39-
cmake
38+
cmake \
39+
g++ clang
4040
elif [ "$RUNNER_OS" == "Windows" ]; then
4141
VCPKG_DEFAULT_TRIPLET=x64-windows vcpkg install
4242
elif [ "$RUNNER_OS" == "macOS" ]; then
@@ -83,6 +83,7 @@ jobs:
8383
# Execute tests defined by the CMake configuration.
8484
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
8585
run: ctest --output-on-failure -C ${{env.BUILD_TYPE}}
86+
shell: bash
8687

8788
- name: Generate coverage report
8889
if: matrix.os == 'ubuntu-latest'
@@ -105,11 +106,16 @@ jobs:
105106
name: coveralls.json
106107
path: coveralls.json
107108

109+
- name: Package
110+
working-directory: ${{github.workspace}}/build
111+
run: cmake --build . --target package
108112

109-
#- name: Package
113+
- uses: actions/upload-artifact@v4
114+
if: matrix.os == 'ubuntu-24.04'
115+
with:
116+
name: packages
117+
path: ${{github.workspace}}/build/Crow-*
118+
119+
#- name: Source package
110120
# working-directory: ${{github.workspace}}/build
111-
# run: |
112-
# cmake --build . --target ALL_BUILD && \
113-
# cmake --build . --target doc && \
114-
# cmake --build . --target package && \
115-
# cpack --config CPackSourceConfig.cmake
121+
# 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)