From c62799e00f2d7e3b30ee431043b551c6fbbd81bb Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 20 Aug 2021 20:30:17 +0200 Subject: [PATCH] CI Add openSUSE with GCC 9. --- .drone.yml | 18 ++++++++++++++++++ README.adoc | 13 ++++++++++++- cmake/packages.cmake | 3 +++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index af08053..f828d0b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -84,6 +84,24 @@ steps: - name: debian-package-cache path: /var/cache/apt/archives +- name: GCC 9 + 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 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 + - rm -rf build && mkdir -p build && cd build + - cmake -G "Unix Makefiles" -DWITH_TESTS=YES .. + - make VERBOSE=1 + - make install DESTDIR=install + - ctest -V + - name: notify image: drillster/drone-email pull: always diff --git a/README.adoc b/README.adoc index 091e76d..4dfc51d 100644 --- a/README.adoc +++ b/README.adoc @@ -76,7 +76,7 @@ If you get the error message that `add-apt-repository` was not found, install ==== Dependencies * Tested OS: Linux -* C\++ compiler with C++17 support (tested: link:{uri-gcc}[GCC] 8/10, +* C\++ compiler with C++17 support (tested: link:{uri-gcc}[GCC] 8/9/10, link:{uri-clang}[clang] 6/11) * link:{uri-cmake}[CMake] (at least: 3.12) * link:{uri-boost}[Boost] (tested: 1.75.0 / 1.65.0) @@ -107,6 +107,17 @@ sudo apt install build-essential cmake libboost-program-options-dev \ [TIP] If `nlohmann-json-dev` can not be found, try `nlohmann-json3-dev`. +===== Install dependencies in openSUSE + +[source,shell] +-------------------------------------------------------------------------------- +sudo zypper install cmake gcc10-c++ rpm-build \ + 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 +-------------------------------------------------------------------------------- + ==== Get sourcecode ===== Release diff --git a/cmake/packages.cmake b/cmake/packages.cmake index 7d06d60..ef7b64d 100644 --- a/cmake/packages.cmake +++ b/cmake/packages.cmake @@ -31,6 +31,9 @@ set(CPACK_DEBIAN_FILE_NAME # RPM set(CPACK_RPM_PACKAGE_LICENSE "AGPL-3") +# Figure out dependencies automatically. +set(CPACK_RPM_PACKAGE_AUTOREQ ON) + # Should be set automatically, but it is not. execute_process(COMMAND uname -m OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE