Skip to content

Commit

Permalink
Merge pull request #3296 from eseiler/infra/cpm
Browse files Browse the repository at this point in the history
[INFRA] CPM find_package and package update cron
  • Loading branch information
eseiler authored Oct 29, 2024
2 parents 2b0b60f + a7fc069 commit f500cf7
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 8 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci_cpm.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 16 additions & 6 deletions cmake/package-lock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -49,17 +59,17 @@ 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)
# use_ccache
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
Expand Down
4 changes: 2 additions & 2 deletions test/seqan3-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit f500cf7

Please sign in to comment.