diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 84b81fc2d..e65608ef3 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -15,21 +15,21 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest + - os: ubuntu-20.04 BUILD_TYPE: default DRAFT: enabled CLANG_FORMAT: clang-format-11 PACKAGES: automake autoconf clang-format-11 git uuid-dev libsystemd-dev liblz4-dev libnss3-dev libzmq3-dev libcurl4-nss-dev libmicrohttpd-dev asciidoc xmlto - - os: ubuntu-latest + - os: ubuntu-20.04 BUILD_TYPE: default DRAFT: disabled CLANG_FORMAT: clang-format-11 PACKAGES: automake autoconf clang-format-11 git uuid-dev libsystemd-dev liblz4-dev libnss3-dev libzmq3-dev libcurl4-nss-dev libmicrohttpd-dev - - os: ubuntu-latest + - os: ubuntu-20.04 BUILD_TYPE: valgrind DRAFT: enabled - PACKAGES: automake autoconf valgrind git uuid-dev libsystemd-dev liblz4-dev libnss3-dev libzmq3-dev libcurl4-nss-dev libmicrohttpd-dev ubuntu-dbgsym-keyring - - os: ubuntu-latest + PACKAGES: automake autoconf valgrind git uuid-dev libsystemd-dev liblz4-dev libnss3-dev libzmq3-dev libcurl4-nss-dev libmicrohttpd-dev + - os: ubuntu-20.04 BUILD_TYPE: cmake DRAFT: enabled PACKAGES: cmake git uuid-dev libsystemd-dev liblz4-dev libnss3-dev libzmq3-dev libcurl4-nss-dev libmicrohttpd-dev @@ -37,17 +37,15 @@ jobs: BUILD_TYPE: default PACKAGES: automake autoconf ossp-uuid zeromq curl libmicrohttpd DRAFT: enabled - CI_SELFTEST: no - os: macos-latest BUILD_TYPE: default DRAFT: disabled - CI_SELFTEST: no PACKAGES: automake autoconf ossp-uuid zeromq curl libmicrohttpd # For non-cmake users, there is an autotools solution with a bit more overhead # to have dependencies ready and pass configure script before making this check). # Note that the autotools variant will also require dependencies preinstalled to # pass its configure script: - - os: ubuntu-latest + - os: ubuntu-20.04 BUILD_TYPE: cmake DO_CLANG_FORMAT_CHECK: 1 CLANG_FORMAT: clang-format-11 @@ -56,10 +54,10 @@ jobs: # 1) Your project sources have a "latest_release" branch or tag # to check out and compare the current commit's ABI to; # 2) Prerequisites are available as packages - no custom rebuilds. - - os: ubuntu-latest + - os: ubuntu-20.04 BUILD_TYPE: abi-compliance-checker PACKAGES: universal-ctags abi-dumper abi-compliance-checker git uuid-dev libsystemd-dev liblz4-dev libnss3-dev libzmq3-dev libcurl4-nss-dev libmicrohttpd-dev - - os: ubuntu-latest + - os: ubuntu-20.04 BUILD_TYPE: check_zproject PACKAGES: git uuid-dev libsystemd-dev liblz4-dev libnss3-dev libzmq3-dev libcurl4-nss-dev libmicrohttpd-dev generator-scripting-language zproject env: @@ -84,26 +82,13 @@ jobs: CI_SELFTEST: ${{ matrix.CI_SELFTEST }} steps: - name: Add debian packages - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-20.04' uses: myci-actions/add-deb-repo@10 with: repo-name: obs repo: deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_20.04/ ./ keys-asc: https://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_20.04/Release.key install: ${{ matrix.PACKAGES }} - - name: Add dbgsym packages (main) - if: matrix.os == 'ubuntu-latest' && matrix.BUILD_TYPE == 'valgrind' - uses: myci-actions/add-deb-repo@10 - with: - repo-name: dbgsym-main - repo: deb http://ddebs.ubuntu.com focal main - - name: Add dbgsym packages (updates) - if: matrix.os == 'ubuntu-latest' && matrix.BUILD_TYPE == 'valgrind' - uses: myci-actions/add-deb-repo@10 - with: - repo-name: dbgsym-updates - repo: deb http://ddebs.ubuntu.com focal-updates main - install: libcurl3-nss-dbgsym - name: Add brew packages if: matrix.os == 'macos-latest' shell: bash @@ -112,7 +97,7 @@ jobs: with: path: czmq - name: build - if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-latest' shell: bash working-directory: czmq run: ./ci_build.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 92fc58e51..d8550e75a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,7 +130,9 @@ set(OPTIONAL_LIBRARIES_STATIC) ######################################################################## # LIBZMQ dependency ######################################################################## -find_package(libzmq REQUIRED) +IF (NOT libzmq_FOUND) + find_package(libzmq REQUIRED) +ENDIF(NOT libzmq_FOUND) IF (libzmq_FOUND) include_directories(${libzmq_INCLUDE_DIRS}) list(APPEND MORE_LIBRARIES ${libzmq_LIBRARIES}) @@ -147,7 +149,9 @@ ENDIF (libzmq_FOUND) ######################################################################## # UUID dependency ######################################################################## -find_package(uuid) +IF (NOT uuid_FOUND) + find_package(uuid) +ENDIF(NOT uuid_FOUND) option(CZMQ_WITH_UUID "Build czmq with uuid" ${UUID_FOUND}) IF (CZMQ_WITH_UUID AND uuid_FOUND) include_directories(${uuid_INCLUDE_DIRS}) @@ -165,7 +169,9 @@ ENDIF (CZMQ_WITH_UUID AND uuid_FOUND) ######################################################################## # SYSTEMD dependency ######################################################################## -find_package(systemd) +IF (NOT systemd_FOUND) + find_package(systemd) +ENDIF(NOT systemd_FOUND) option(CZMQ_WITH_SYSTEMD "Build czmq with systemd" ${SYSTEMD_FOUND}) IF (CZMQ_WITH_SYSTEMD AND systemd_FOUND) include_directories(${systemd_INCLUDE_DIRS}) @@ -183,7 +189,9 @@ ENDIF (CZMQ_WITH_SYSTEMD AND systemd_FOUND) ######################################################################## # LZ4 dependency ######################################################################## -find_package(lz4) +IF (NOT lz4_FOUND) + find_package(lz4) +ENDIF(NOT lz4_FOUND) option(CZMQ_WITH_LZ4 "Build czmq with lz4" ${LZ4_FOUND}) IF (CZMQ_WITH_LZ4 AND lz4_FOUND) include_directories(${lz4_INCLUDE_DIRS}) @@ -201,7 +209,9 @@ ENDIF (CZMQ_WITH_LZ4 AND lz4_FOUND) ######################################################################## # LIBCURL dependency ######################################################################## -find_package(libcurl) +IF (NOT libcurl_FOUND) + find_package(libcurl) +ENDIF(NOT libcurl_FOUND) option(CZMQ_WITH_LIBCURL "Build czmq with libcurl" ${LIBCURL_FOUND}) IF (CZMQ_WITH_LIBCURL AND libcurl_FOUND) include_directories(${libcurl_INCLUDE_DIRS}) @@ -219,7 +229,9 @@ ENDIF (CZMQ_WITH_LIBCURL AND libcurl_FOUND) ######################################################################## # NSS dependency ######################################################################## -find_package(nss) +IF (NOT nss_FOUND) + find_package(nss) +ENDIF(NOT nss_FOUND) option(CZMQ_WITH_NSS "Build czmq with nss" ${NSS_FOUND}) IF (CZMQ_WITH_NSS AND nss_FOUND) include_directories(${nss_INCLUDE_DIRS}) @@ -237,7 +249,9 @@ ENDIF (CZMQ_WITH_NSS AND nss_FOUND) ######################################################################## # LIBMICROHTTPD dependency ######################################################################## -find_package(libmicrohttpd) +IF (NOT libmicrohttpd_FOUND) + find_package(libmicrohttpd) +ENDIF(NOT libmicrohttpd_FOUND) option(CZMQ_WITH_LIBMICROHTTPD "Build czmq with libmicrohttpd" ${LIBMICROHTTPD_FOUND}) IF (CZMQ_WITH_LIBMICROHTTPD AND libmicrohttpd_FOUND) include_directories(${libmicrohttpd_INCLUDE_DIRS})