Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/config/codechecker.skip
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-FileCopyrightText: 2006-2025, Knut Reinert & Freie Universität Berlin
# SPDX-FileCopyrightText: 2016-2025, Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: CC0-1.0

+${GITHUB_WORKSPACE}/*
-*
23 changes: 23 additions & 0 deletions .github/config/codechecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: 2006-2025, Knut Reinert & Freie Universität Berlin
# SPDX-FileCopyrightText: 2016-2025, Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: CC0-1.0

analyze:
- --enable=performance
- --enable=bugprone
- --enable=clang-diagnostic-shadow
- --disable=bugprone-easily-swappable-parameters
- --disable=clang-diagnostic-implicit-int-float-conversion
- --disable=clang-diagnostic-float-conversion
- --disable=clang-diagnostic-implicit-int-conversion
- --disable=bugprone-exception-escape
- --disable=bugprone-narrowing-conversions
- --disable=deadcode.DeadStores
- --skip=${GITHUB_WORKSPACE}/.github/config/codechecker.skip
- --clean

parse:
- --export=html
- --output=./html
- --skip=${GITHUB_WORKSPACE}/.github/config/codechecker.skip
- --trim-path-prefix=${GITHUB_WORKSPACE}/
2 changes: 1 addition & 1 deletion .github/workflows/ci_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defaults:
jobs:
check:
name: REUSE Compliance
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 120
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
steps:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/cron_codechecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2006-2025, Knut Reinert & Freie Universität Berlin
# SPDX-FileCopyrightText: 2016-2025, Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: CC0-1.0

name: CodeChecker

on:
schedule:
- cron: "0 8 * * MON"
workflow_dispatch:

concurrency:
group: codechecker-${{ github.ref }}
cancel-in-progress: true

env:
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin

defaults:
run:
shell: bash -Eexuo pipefail {0}

jobs:
build:
name: CodeChecker
runs-on: ubuntu-latest
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
container:
image: ghcr.io/seqan/clang-19
steps:
- name: Run CodeChecker
uses: seqan/actions/codechecker@main
with:
configure_path: ../test/analyse
deploy_host: ${{ secrets.DEPLOY_HOST }}
deploy_user: ${{ secrets.DEPLOY_USER }}
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
deploy_path: ${{ secrets.DEPLOY_CODECHECKER_PATH }}
55 changes: 55 additions & 0 deletions .github/workflows/cron_codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
# SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: CC0-1.0

name: CodeQL

on:
schedule:
- cron: "0 21 * * MON"
workflow_dispatch:

concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true

env:
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin

defaults:
run:
shell: bash -Eeuxo pipefail {0}

jobs:
codeql:
name: CodeQL
runs-on: ubuntu-latest
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
permissions:
security-events: write
container:
image: ghcr.io/seqan/gcc-14
volumes:
- /home/runner:/home/runner
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp
build-mode: manual
trap-caching: false

- name: Build tests
run: |
cmake test/analyse -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
make -k

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:cpp"
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
group: lint-${{ github.event.pull_request.number }}
cancel-in-progress: true
needs: cancel_running_workflows
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Run lint
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/readme_snippet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
push:
branches:
- 'main'
workflow_dispatch:

concurrency:
group: readme-snippet-${{ github.ref }}
cancel-in-progress: true

env:
TZ: Europe/Berlin
Expand All @@ -19,11 +24,9 @@ defaults:
jobs:
readme-snippet:
name: Update README
concurrency:
group: readme-snippet-${{ github.ref }}
cancel-in-progress: false
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 15
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout Sharg
uses: actions/checkout@v4
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/update_cookbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
# SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: CC0-1.0

name: Sharg lint
name: Sharg Cookbook

on:
push:
branches:
- 'main'
workflow_dispatch:

concurrency:
group: update-cookbook-${{ github.ref }}
cancel-in-progress: true

env:
TZ: Europe/Berlin
Expand All @@ -19,11 +24,9 @@ defaults:
jobs:
update-cookbook:
name: Update Cookbook
concurrency:
group: update-cookbook-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 15
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout Sharg
uses: actions/checkout@v4
Expand Down
13 changes: 13 additions & 0 deletions test/analyse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
# SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required (VERSION 3.20...3.31)
project (sharg_test_analyze CXX)

include (../sharg-test.cmake)

enable_testing ()

add_subdirectory (../snippet snippet)
add_subdirectory (../unit unit)
14 changes: 10 additions & 4 deletions test/sharg-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,21 @@ if (NOT DEFINED CMAKE_CXX_EXTENSIONS)
set (CMAKE_CXX_EXTENSIONS OFF)
endif ()

set (SHARG_TEST_CPM_DIR
"${CMAKE_CURRENT_LIST_DIR}/../cmake/"
CACHE STRING "Path to directory containing CPM.cmake.")

set (CPM_INDENT "CMake Package Manager CPM: ")
include ("${SHARG_TEST_CPM_DIR}/CPM.cmake")
CPMUsePackageLock ("${SHARG_TEST_CPM_DIR}/package-lock.cmake")

include (${CMAKE_CURRENT_LIST_DIR}/cmake/sharg_require_ccache.cmake)

# require Sharg package
find_package (Sharg REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../cmake)

enable_testing ()

set (CPM_INDENT "CMake Package Manager CPM: ")
CPMUsePackageLock ("${CMAKE_CURRENT_LIST_DIR}/../cmake/package-lock.cmake")

include (CheckCXXSourceCompiles)
include (FindPackageHandleStandardArgs)
include (FindPackageMessage)
Expand Down Expand Up @@ -115,5 +122,4 @@ list (APPEND SHARG_EXTERNAL_PROJECT_CMAKE_ARGS "-DCMAKE_VERBOSE_MAKEFILE=${CMAKE

include (sharg_test_component)
include (sharg_test_files)
include (sharg_require_ccache)
include (add_subdirectories)