diff --git a/.github/workflows/ci_cpm.yml b/.github/workflows/ci_cpm.yml new file mode 100644 index 0000000000..bed471bc74 --- /dev/null +++ b/.github/workflows/ci_cpm.yml @@ -0,0 +1,32 @@ +# SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin +# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik +# SPDX-License-Identifier: CC0-1.0 + +name: Update CPM + +on: + schedule: + - cron: "0 12 * * SAT" + workflow_dispatch: + +env: + TZ: Europe/Berlin + +concurrency: + group: update-cpm-actions + cancel-in-progress: true + +jobs: + update_cpm: + name: Update CPM + runs-on: ubuntu-latest + timeout-minutes: 15 + if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' + steps: + - name: Run update CPM + uses: seqan/actions/update_cpm_package_lock@main + with: + token: ${{ secrets.SEQAN_ACTIONS_PAT }} + gpg_key: ${{ secrets.SEQAN_ACTIONS_GPG_KEY }} + gpg_passphrase: ${{ secrets.SEQAN_ACTIONS_GPG_PASSPHRASE }} + package_lock_file: cmake/package-lock.cmake diff --git a/cmake/package-lock.cmake b/cmake/package-lock.cmake index a311a3d483..548b3feda3 100644 --- a/cmake/package-lock.cmake +++ b/cmake/package-lock.cmake @@ -5,6 +5,14 @@ # CPM Package Lock # This file should be committed to version control +# URL/GIT_TAG may be annotated with a branch name +# This is needed for https://github.com/seqan/actions/tree/main/update_cpm_package_lock + +# The first argument of CPMDeclarePackage can be freely chosen and is used as argument in CPMGetPackage. +# The NAME argument should be package name that would also be used in a find_package call. +# Ideally, both are the same, which might not always be possible: https://github.com/cpm-cmake/CPM.cmake/issues/603 +# This is needed to support CPM_USE_LOCAL_PACKAGES + # cereal set (SEQAN3_CEREAL_VERSION 1.3.2) CPMDeclarePackage (cereal @@ -15,10 +23,12 @@ CPMDeclarePackage (cereal QUIET YES) # sdsl-lite # Use URL download of the commit archive such that we do not clone submodules +# Package name is still sdsl (name as v2 at xxsds/sdsl), but sdsl-lite is not currently being packaged +# To avoid accidentally using the older sdsl, NAME is set to sdsl-lite set (SEQAN3_SDSL_VERSION 14cd017027ea742353fc5b500d1cb1d95896b77e) CPMDeclarePackage (sdsl-lite NAME sdsl-lite - URL https://github.com/xxsds/sdsl-lite/archive/${SEQAN3_SDSL_VERSION}.tar.gz + URL https://github.com/xxsds/sdsl-lite/archive/${SEQAN3_SDSL_VERSION}.tar.gz # master DOWNLOAD_ONLY YES QUIET YES) # benchmark @@ -33,7 +43,7 @@ CPMDeclarePackage (benchmark # googletest set (SEQAN3_GOOGLETEST_VERSION 1.15.2) CPMDeclarePackage (googletest - NAME googletest + NAME GTest VERSION ${SEQAN3_GOOGLETEST_VERSION} GITHUB_REPOSITORY google/googletest SYSTEM TRUE @@ -49,9 +59,9 @@ CPMDeclarePackage (doxygen_awesome QUIET YES) # seqan2 set (SEQAN3_SEQAN2_VERSION 5f8d538bc6fa5eaaa0b56067abf355ef6f3855dc) -CPMDeclarePackage (seqan2 - NAME seqan2 - GIT_TAG ${SEQAN3_SEQAN2_VERSION} +CPMDeclarePackage (seqan + NAME seqan + GIT_TAG ${SEQAN3_SEQAN2_VERSION} # main GITHUB_REPOSITORY seqan/seqan DOWNLOAD_ONLY YES QUIET YES) @@ -59,7 +69,7 @@ CPMDeclarePackage (seqan2 set (SEQAN3_USE_CCACHE_VERSION d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37) CPMDeclarePackage (use_ccache NAME use_ccache - GIT_TAG ${SEQAN3_USE_CCACHE_VERSION} + GIT_TAG ${SEQAN3_USE_CCACHE_VERSION} # main GITHUB_REPOSITORY seqan/cmake-scripts SOURCE_SUBDIR ccache SYSTEM TRUE diff --git a/test/seqan3-test.cmake b/test/seqan3-test.cmake index afc50e8dda..898c347ad1 100644 --- a/test/seqan3-test.cmake +++ b/test/seqan3-test.cmake @@ -36,10 +36,10 @@ option (SEQAN3_WITH_SEQAN2 "Build tests with SeqAn2." OFF) cmake_dependent_option (SEQAN3_WITH_SEQAN2_CI "Build tests with SeqAn2." ON "DEFINED ENV{CI}" OFF) if (SEQAN3_WITH_SEQAN2 OR SEQAN3_WITH_SEQAN2_CI) - CPMGetPackage (seqan2) + CPMGetPackage (seqan) find_path (SEQAN3_SEQAN2_INCLUDE_DIR NAMES seqan/version.h - HINTS "${seqan2_SOURCE_DIR}/include") + HINTS "${seqan_SOURCE_DIR}/include") if (SEQAN3_SEQAN2_INCLUDE_DIR) message (STATUS "Building tests with SeqAn2.")