CI: Add package generation for openSUSE Leap 15.
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
3e23dc2cd9
commit
c41f3a2485
36
.drone.yml
36
.drone.yml
|
@ -100,8 +100,8 @@ steps:
|
|||
LANG: C.UTF-8
|
||||
commands:
|
||||
- find /etc/zypp/repos.d/ -type f -exec sed s/keeppackages=0/keeppackages=1/ {} \;
|
||||
- zypper install cmake gcc9-c++ rpm-build
|
||||
- zypper install catch2 libboost_program_options1_75_0-devel libboost_locale1_75_0-devel libboost_log1_75_0-devel fmt-devel libarchive-devel pugixml-devel nlohmann_json-devel asciidoc
|
||||
- zypper --non-interactive install cmake gcc9-c++ rpm-build
|
||||
- zypper --non-interactive install catch2 libboost_program_options1_75_0-devel libboost_locale1_75_0-devel libboost_log1_75_0-devel fmt-devel libarchive-devel pugixml-devel nlohmann_json-devel asciidoc
|
||||
- rm -rf build && mkdir -p build && cd build
|
||||
- cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
|
||||
- make VERBOSE=1
|
||||
|
@ -187,6 +187,8 @@ steps:
|
|||
volumes:
|
||||
- name: deb-package-cache
|
||||
path: /var/cache/apt/archives
|
||||
depends_on:
|
||||
- Debian bullseye
|
||||
|
||||
- name: Ubuntu focal
|
||||
image: ubuntu:focal
|
||||
|
@ -211,6 +213,9 @@ steps:
|
|||
volumes:
|
||||
- name: deb-package-cache
|
||||
path: /var/cache/apt/archives
|
||||
depends_on:
|
||||
- Debian bullseye
|
||||
- Ubuntu focal
|
||||
|
||||
- name: Download CMake 3.12 installer
|
||||
image: plugins/download
|
||||
|
@ -247,6 +252,32 @@ steps:
|
|||
volumes:
|
||||
- name: deb-package-cache
|
||||
path: /var/cache/apt/archives
|
||||
depends_on:
|
||||
- Debian bullseye
|
||||
- Ubuntu focal
|
||||
- Download CMake 3.12 installer
|
||||
|
||||
- name: openSUSE Leap 15
|
||||
image: opensuse/leap:15
|
||||
pull: always
|
||||
environment:
|
||||
CXX: g++-9
|
||||
CXXFLAGS: -pipe -O2
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
LANG: C.UTF-8
|
||||
commands:
|
||||
- find /etc/zypp/repos.d/ -type f -exec sed s/keeppackages=0/keeppackages=1/ {} \;
|
||||
- zypper --non-interactive install cmake gcc9-c++ rpm-build lsb-release
|
||||
- zypper --non-interactive install catch2 libboost_program_options1_75_0-devel libboost_locale1_75_0-devel libboost_log1_75_0-devel fmt-devel libarchive-devel pugixml-devel nlohmann_json-devel asciidoc
|
||||
- rm -rf build && mkdir -p build && cd build
|
||||
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
- make VERBOSE=1
|
||||
- make install DESTDIR=install
|
||||
- cpack -G RPM
|
||||
- cp -v epubgrep-${DRONE_TAG}-0.x86_64.opensuse-$(lsb_release --release --short).rpm ..
|
||||
volumes:
|
||||
- name: rpm-package-cache
|
||||
path: /var/cache/zypp/packages
|
||||
|
||||
- name: gitea_release
|
||||
image: plugins/gitea-release
|
||||
|
@ -262,6 +293,7 @@ steps:
|
|||
- epubgrep_${DRONE_TAG}-0_amd64_bullseye.deb
|
||||
- epubgrep_${DRONE_TAG}-0_amd64_focal.deb
|
||||
- epubgrep_${DRONE_TAG}-0_amd64_bionic.deb
|
||||
- epubgrep-${DRONE_TAG}-0.x86_64.opensuse-$(lsb_release --release --short).rpm
|
||||
checksum:
|
||||
- sha512
|
||||
|
||||
|
|
|
@ -40,6 +40,18 @@ execute_process(COMMAND uname -m
|
|||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-0.${CPACK_RPM_PACKAGE_ARCHITECTURE}")
|
||||
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-0.${CPACK_RPM_PACKAGE_ARCHITECTURE}")
|
||||
|
||||
execute_process(COMMAND lsb_release --id --short
|
||||
OUTPUT_VARIABLE OS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if("${OS}" STREQUAL "openSUSE")
|
||||
execute_process(COMMAND lsb_release --release --short
|
||||
OUTPUT_VARIABLE OS_RELEASE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(CPACK_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-0.${CPACK_RPM_PACKAGE_ARCHITECTURE}.opensuse-${OS_RELEASE}")
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
|
Loading…
Reference in New Issue
Block a user