Merge 2075c62111
into a6ce08abf7
This commit is contained in:
commit
45a56d8e3e
34
.github/workflows/build_release.yml
vendored
Normal file
34
.github/workflows/build_release.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Build Source Release
|
||||||
|
|
||||||
|
# Trigger whenever a release is created
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- created
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: build
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: clone the repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create the Debian and RPM package
|
||||||
|
run: |
|
||||||
|
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr
|
||||||
|
cmake --build build
|
||||||
|
cd build
|
||||||
|
cpack -G DEB
|
||||||
|
cpack -G RPM
|
||||||
|
|
||||||
|
- name: Upload debian and rpm package to release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.event.release.tag_name }}
|
||||||
|
files: |
|
||||||
|
./build/*.deb
|
||||||
|
./build/*.rpm
|
||||||
|
|
@ -34,3 +34,6 @@ if(BUILD_GMOCK)
|
|||||||
else()
|
else()
|
||||||
add_subdirectory( googletest )
|
add_subdirectory( googletest )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Include CPack
|
||||||
|
include(CPackConfig.txt)
|
38
CPackConfig.txt
Normal file
38
CPackConfig.txt
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
set(CPACK_PACKAGE_NAME "libgtest-dev")
|
||||||
|
set(CPACK_PACKAGE_CONTACT "Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>")
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION "Description: Google's framework for writing C++ tests
|
||||||
|
Google's framework for writing C++ tests on a variety of platforms. Based on
|
||||||
|
the xUnit architecture. Supports automatic test discovery, a rich set of
|
||||||
|
assertions, user-defined assertions, death tests, fatal and non-fatal failures,
|
||||||
|
value- and type-parameterized tests, various options for running the tests, and
|
||||||
|
XML test report generation.")
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Google's framework for writing C++ tests")
|
||||||
|
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/google/googletest")
|
||||||
|
set(CPACK_STRIP_FILES false)
|
||||||
|
set(CPACK_PACKAGE_ARCHITECTURE "amd64")
|
||||||
|
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
||||||
|
set(CPACK_PACKAGE_ARCHITECTURE "arm64")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CPACK_PACKAGE_VERSION "${GOOGLETEST_VERSION}")
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_PACKAGE_ARCHITECTURE}")
|
||||||
|
|
||||||
|
# Copy over documentation (Debian, probably same for rpm and mac?)
|
||||||
|
# install(DIRECTORY "${CMAKE_SOURCE_DIR}/LICENSES" DESTINATION "/usr/share/doc/libcapstone-dev")
|
||||||
|
# install(FILES "${CMAKE_SOURCE_DIR}/ChangeLog" DESTINATION "/usr/share/doc/libcapstone-dev")
|
||||||
|
# install(FILES "${CMAKE_SOURCE_DIR}/README.md" DESTINATION "/usr/share/doc/libcapstone-dev")
|
||||||
|
|
||||||
|
# Set Debian-specific package variables
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_SOURCE "googletest")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_ORIGINAL_MAINTAINER "Steve M. Robbins <smr@debian.org>")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.2.5)")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_SECTION "universe/libdevel")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_MULTIARCH "same")
|
||||||
|
|
||||||
|
# RPM package settings
|
||||||
|
set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
|
||||||
|
set(CPACK_RPM_PACKAGE_REQUIRES "libc6 >= 2.2.5")
|
||||||
|
|
||||||
|
# Include CPack
|
||||||
|
include(CPack)
|
Loading…
Reference in New Issue
Block a user