Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish RPM packages for Azure Linux in the release job #6774

Merged
merged 8 commits into from
Jan 30, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Unite cpack
maxtropets committed Jan 30, 2025
commit 0ef1933d49ee3a957b7ec88604e8bab2eca32a70
2 changes: 1 addition & 1 deletion .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ jobs:
git config --global --add safe.directory /__w/CCF/CCF
mkdir build
cd build
CC=`which clang` CXX=`which clang++` cmake -GNinja -DCOMPILE_TARGET=${{ matrix.platform.name }} -DCLIENT_PROTOCOLS_TEST=ON -DPACKAGE_TYPE=${{ matrix.platform.package_format }} -DCMAKE_BUILD_TYPE=Release ..
CC=`which clang` CXX=`which clang++` cmake -GNinja -DCOMPILE_TARGET=${{ matrix.platform.name }} -DCLIENT_PROTOCOLS_TEST=ON -DCMAKE_BUILD_TYPE=Release ..
ninja -v | tee build.log

- name: "Install Extended Testing Tools"
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -70,21 +70,17 @@ jobs:
- name: virtual
os: ubuntu
image: ghcr.io/microsoft/ccf/ci/default:build-14-01-2025
package_format: DEB
test_filter: "benchmark|unit"
- name: snp
os: ubuntu
image: ghcr.io/microsoft/ccf/ci/default:build-14-01-2025
package_format: DEB
- name: virtual
os: azure-linux
image: mcr.microsoft.com/azurelinux/base/core:3.0
package_format: RPM
test_filter: "benchmark|unit|protocolstest|lts"
- name: snp
os: azure-linux
image: mcr.microsoft.com/azurelinux/base/core:3.0
package_format: RPM

runs-on: [self-hosted, 1ES.Pool=gha-virtual-ccf-sub]
container:
@@ -118,7 +114,7 @@ jobs:
git config --global --add safe.directory /__w/CCF/CCF
mkdir build
cd build
CC=`which clang` CXX=`which clang++` cmake -GNinja -DCOMPILE_TARGET=${{ matrix.platform.name }} -DCLIENT_PROTOCOLS_TEST=ON -DPACKAGE_TYPE=${{ matrix.platform.package_format }} -DCMAKE_BUILD_TYPE=Release ..
CC=`which clang` CXX=`which clang++` cmake -GNinja -DCOMPILE_TARGET=${{ matrix.platform.name }} -DCLIENT_PROTOCOLS_TEST=ON -DCMAKE_BUILD_TYPE=Release ..
ninja -v | tee build.log

- name: "Install Extended Testing Tools"
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -36,11 +36,7 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
)
endif()

if(PACKAGE_TYPE STREQUAL "DEB")
include(${CCF_DIR}/cmake/cpack_deb.cmake)
elseif(PACKAGE_TYPE STREQUAL "RPM")
include(${CCF_DIR}/cmake/cpack_rpm.cmake)
endif()
include(${CCF_DIR}/cmake/cpack_settings.cmake)

message(STATUS "CMAKE_INSTALL_PREFIX is '${CMAKE_INSTALL_PREFIX}'")

31 changes: 0 additions & 31 deletions cmake/cpack_rpm.cmake

This file was deleted.

26 changes: 26 additions & 0 deletions cmake/cpack_deb.cmake → cmake/cpack_settings.cmake
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CCF_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION ${CCF_RELEASE_VERSION})
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

# DEB-specific settings

set(CPACK_DEBIAN_PACKAGE_VERSION "${CCF_RELEASE_VERSION}")

if(CCF_VERSION_SUFFIX)
@@ -32,6 +34,30 @@ endif()

list(JOIN CCF_DEB_DEPENDENCIES ", " CPACK_DEBIAN_PACKAGE_DEPENDS)

message(STATUS "DEB package dependencies: ${CCF_DEB_DEPENDENCIES}")

set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)

# RPM-specific settings

set(CPACK_RPM_PACKAGE_VERSION "${CCF_RELEASE_VERSION}")

if(CCF_VERSION_SUFFIX)
set(CPACK_RPM_PACKAGE_VERSION
"${CPACK_RPM_PACKAGE_VERSION}~${CCF_VERSION_SUFFIX}"
)
endif()

message(STATUS "RPM package version: ${CPACK_RPM_PACKAGE_VERSION}")

set(CCF_RPM_DEPENDENCIES
"libuv >= 1.34.2, openssl >= 3.3.0, nghttp2 >= 1.40.0, curl >= 7.68.0, libcxxabi >= 18.1.2"
)

message(STATUS "RPM package dependencies: ${CCF_RPM_DEPENDENCIES}")

set(CPACK_RPM_PACKAGE_REQUIRES "${CCF_RPM_DEPENDENCIES}")

set(CPACK_RPM_FILE_NAME RPM-DEFAULT)

include(CPack)