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
7 changes: 7 additions & 0 deletions .github/config/codechecker.skip
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 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}/include/fpgalign/contrib/*
+${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=prefix: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}/
7 changes: 7 additions & 0 deletions .github/config/custom.imp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 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

[
{ "include": [ "<seqan3/contrib/std/detail/adaptor_base.hpp>", "public", "<hibf/contrib/std/detail/adaptor_base.hpp>", "public"] }
]
37 changes: 37 additions & 0 deletions .github/workflows/cron_codechecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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 4 * * MON"
workflow_dispatch:

concurrency:
group: codechecker-actions
cancel-in-progress: true

env:
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/codechecker
steps:
- name: Run CodeChecker
uses: seqan/actions/codechecker@main
with:
deploy_host: ${{ secrets.DEPLOY_HOST }}
deploy_user: ${{ secrets.DEPLOY_USER }}
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
deploy_path: ${{ secrets.DEPLOY_CODECHECKER_PATH }}
48 changes: 48 additions & 0 deletions .github/workflows/cron_codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 6 * * SAT"
workflow_dispatch:

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

env:
CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false
SHARG_NO_VERSION_CHECK: 1
TZ: Europe/Berlin

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

jobs:
codeql:
name: CodeQL
runs-on: ubuntu-latest
permissions:
security-events: write
container:
image: ghcr.io/seqan/gcc-second-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:cpp"
32 changes: 32 additions & 0 deletions .github/workflows/cron_cpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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: 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
37 changes: 37 additions & 0 deletions .github/workflows/cron_iwyu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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: IWYU

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

concurrency:
group: iwyu-actions
cancel-in-progress: true

env:
TZ: Europe/Berlin

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

jobs:
build:
name: IWYU
runs-on: ubuntu-latest
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
container:
image: ghcr.io/seqan/iwyu
steps:
- name: Run IWYU
uses: seqan/actions/iwyu@main
with:
configure_path: .
token: ${{ secrets.SEQAN_ACTIONS_PAT }}
gpg_key: ${{ secrets.SEQAN_ACTIONS_GPG_KEY }}
gpg_passphrase: ${{ secrets.SEQAN_ACTIONS_GPG_PASSPHRASE }}
99 changes: 99 additions & 0 deletions .github/workflows/cron_sanitizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# 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: Sanitizer

on:
schedule:
- cron: "0 4 * * SAT"
workflow_dispatch:

concurrency:
group: sanitizer-actions
cancel-in-progress: true

env:
TZ: Europe/Berlin
TSAN_OPTIONS: ignore_noninstrumented_modules=1
UBSAN_OPTIONS: print_stacktrace=1

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

jobs:
build:
name: ${{ matrix.name }} ${{ matrix.build_type }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
env:
ASAN_OPTIONS: strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_leaks=${{ contains(matrix.os, 'macos') && '0' || '1' }}
strategy:
fail-fast: false
matrix:
name: [ASan, TSan, UBSan]
os: [ubuntu-latest, macos-latest]
build_type: [Release, RelWithDebInfo, Debug]
exclude:
- name: "TSan"
os: macos-latest

include:
- name: "ASan"
cxx_flags: "-fno-omit-frame-pointer -fsanitize=address"

- name: "TSan"
cxx_flags: "-fno-omit-frame-pointer -fsanitize=thread"

- name: "UBSan"
os: macos-latest
cxx_flags: "-fno-omit-frame-pointer -fsanitize=undefined,float-divide-by-zero,implicit-conversion,local-bounds,nullability -Wno-pass-failed"

- name: "UBSan"
os: macos-latest
build_type: Release
ctest_excludes: "-E tmp_directory_snippet_cmp_output"

- name: "UBSan"
os: macos-latest
build_type: RelWithDebInfo
ctest_excludes: "-E tmp_directory_snippet_cmp_output"

- name: "UBSan"
os: ubuntu-latest
cxx_flags: "-fno-omit-frame-pointer -fsanitize=undefined,float-divide-by-zero"

- os: macos-latest
compiler: clang-latest

- os: ubuntu-latest
compiler: gcc-latest
image: ghcr.io/seqan/gcc-latest

- name: "TSan"
os: ubuntu-latest
compiler: clang-latest
image: ghcr.io/seqan/clang-latest
container:
image: ${{ matrix.image || '' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup compiler
if: contains(matrix.os, 'macos')
uses: seqan/actions/setup-compiler@main
with:
compiler: ${{ matrix.compiler }}

- name: Configure tests
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
make gtest_main

- name: Build and run tests
working-directory: build
run: make -k check
2 changes: 1 addition & 1 deletion cmake/package-lock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ CPMDeclarePackage (use_ccache
# thresholding
CPMDeclarePackage (thresholding
NAME thresholding
URL "${PROJECT_SOURCE_DIR}/contrib/threshold.tar.gz"
URL "${PROJECT_SOURCE_DIR}/contrib/threshold.tar.gz" # main
URL_HASH SHA256=4990c7fb9778a2fb8a19794b966d57496ca77bcd708b4cee3c93eea6e5b67d80
SYSTEM TRUE
EXCLUDE_FROM_ALL TRUE
Expand Down
7 changes: 4 additions & 3 deletions include/fpgalign/argument_parsing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

#pragma once

#include <string>
#include <vector>
#include <cstdint> // for uint8_t
#include <string> // for string
#include <vector> // for vector

#include <fpgalign/config.hpp>
#include <fpgalign/config.hpp> // for config

enum class subcommand : uint8_t
{
Expand Down
3 changes: 2 additions & 1 deletion include/fpgalign/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

#pragma once

#include <filesystem>
#include <cstdint> // for uint8_t, uint16_t, uint32_t
#include <filesystem> // for path

struct config
{
Expand Down
3 changes: 3 additions & 0 deletions include/fpgalign/contrib/minimiser_hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

#include <seqan3/alphabet/nucleotide/dna4.hpp>

// IWYU pragma: begin_exports
#include <hibf/contrib/std/detail/adaptor_base.hpp>
#include <hibf/contrib/std/detail/adaptor_from_functor.hpp>
// IWYU pragma: end_exports

// Same as seqan3::views::minimiser_hash, but optimized for dna4, with integrated adjust_seed

Expand Down
15 changes: 9 additions & 6 deletions include/fpgalign/meta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

#pragma once

#include <filesystem>
#include <string>
#include <vector>
#include <cstddef> // for size_t
#include <cstdint> // for uint8_t, uint32_t
#include <string> // for basic_string, string
#include <vector> // for vector

#include <seqan3/io/sequence_file/input.hpp>
#include <seqan3/alphabet/nucleotide/dna4.hpp> // for dna4
#include <seqan3/io/detail/misc.hpp> // for set_format
#include <seqan3/io/record.hpp> // for field, fields
#include <seqan3/io/sequence_file/input.hpp> // for sequence_file_input, sequence_file_input_default_traits_dna

#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>
#include <cereal/macros.hpp> // for CEREAL_SERIALIZE_FUNCTION_NAME

struct dna4_traits : seqan3::sequence_file_input_default_traits_dna
{
Expand Down
8 changes: 5 additions & 3 deletions include/fpgalign/search/search.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

#pragma once

#include <fpgalign/config.hpp>
#include <fpgalign/contrib/slotted_cart_queue.hpp>
#include <fpgalign/meta.hpp>
#include <cstddef> // for size_t

#include <fpgalign/config.hpp> // for config
#include <fpgalign/contrib/slotted_cart_queue.hpp> // for slotted_cart_queue
#include <fpgalign/meta.hpp> // for meta

namespace search
{
Expand Down
6 changes: 4 additions & 2 deletions include/fpgalign/utility/fmindex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

#pragma once

#include <fmindex-collection/fmindex/BiFMIndex.h>
#include <cstddef> // for size_t

#include <fpgalign/config.hpp>
#include <fmindex-collection/fmindex/BiFMIndex.h> // for BiFMIndex

#include <fpgalign/config.hpp> // for config

namespace utility
{
Expand Down
Loading