-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3281 from eseiler/infra/api
[INFRA] API Stability
- Loading branch information
Showing
11 changed files
with
195 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Failure {{ build }} on gcc{{ compiler }} | ||
Failure {{ build }} on {{ compiler }} | ||
--- | ||
|
||
See {{ url }} for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,76 +18,58 @@ concurrency: | |
env: | ||
SEQAN3_NO_VERSION_CHECK: 1 | ||
TZ: Europe/Berlin | ||
ISSUE: 2746 # Issue number to use for reporting failures | ||
ISSUE: 3280 # Issue number to use for reporting failures | ||
|
||
defaults: | ||
run: | ||
shell: bash -Eexuo pipefail {0} | ||
shell: bash -Eeuxo pipefail {0} | ||
|
||
jobs: | ||
build: | ||
name: API-Stability gcc${{ matrix.compiler }} | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 300 | ||
name: API-Stability ${{ matrix.compiler }} | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: [11, 12, 13] | ||
|
||
compiler: ["gcc-14", "gcc-13", "gcc-12", "gcc-11"] | ||
container: | ||
image: ghcr.io/seqan/${{ matrix.compiler }} | ||
volumes: | ||
- /home/runner:/home/runner | ||
steps: | ||
- name: Checkout SeqAn3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: seqan3 | ||
fetch-depth: 1 | ||
submodules: true | ||
|
||
- name: Checkout SeqAn2 | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: seqan/seqan | ||
path: seqan3/submodules/seqan | ||
fetch-depth: 1 | ||
|
||
- name: Setup compiler | ||
uses: seqan/actions/setup-compiler@main | ||
with: | ||
compiler: gcc-${{ matrix.compiler }} | ||
|
||
- name: Install CMake | ||
uses: seqan/actions/setup-cmake@main | ||
with: | ||
cmake: 3.16.9 | ||
path: submodules/seqan | ||
|
||
- name: Configure tests | ||
run: | | ||
mkdir seqan3-build | ||
cd seqan3-build | ||
cmake ../seqan3/test/api_stability -DCMAKE_BUILD_TYPE=Release | ||
mkdir build && cd build | ||
cmake ../test/api_stability -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" | ||
- name: Build tests | ||
run: | | ||
cd seqan3-build | ||
CMAKE_BUILD_PARALLEL_LEVEL=2 cmake --build . -- -k 2>&1 | tee build.log | ||
- name: Setup Python | ||
if: ${{ failure() }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
working-directory: build | ||
run: make -k 2>&1 | tee build.log | ||
|
||
- name: Process Log | ||
if: ${{ failure() }} | ||
if: failure() | ||
run: | | ||
FILE="seqan3/.github/ISSUE_TEMPLATE/cron_comment_template.md" | ||
python3 seqan3/.github/workflows/scripts/process_compiler_error_log.py seqan3-build/build.log >> $FILE | ||
FILE=".github/ISSUE_TEMPLATE/cron_comment_template.md" | ||
python3 .github/workflows/scripts/process_compiler_error_log.py build/build.log >> ${FILE} | ||
- name: Create comment body | ||
if: ${{ failure() }} | ||
if: failure() | ||
id: comment-body | ||
run: | | ||
FILE="seqan3/.github/ISSUE_TEMPLATE/cron_comment_template.md" | ||
FILE=".github/ISSUE_TEMPLATE/cron_comment_template.md" | ||
URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" | ||
sed -i "s@{{ build }}@${{ matrix.build }}@" $FILE | ||
sed -i "s@{{ compiler }}@${{ matrix.compiler }}@" $FILE | ||
|
@@ -96,21 +78,31 @@ jobs: | |
cat $FILE >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Create comment body | ||
if: success() | ||
id: comment-body | ||
run: echo "body=Success ${{ matrix.build }} on ${{ matrix.compiler }}" >> $GITHUB_OUTPUT | ||
|
||
- name: Reopen issue | ||
if: ${{ failure() }} | ||
uses: octokit/[email protected] | ||
with: | ||
route: PATCH /repos/{owner}/{repo}/issues/{issue_number} | ||
owner: ${{ github.repository_owner }} | ||
repo: seqan3 | ||
issue_number: ${{ env.ISSUE }} | ||
state: "open" | ||
if: failure() | ||
run: gh issue reopen ${{ env.ISSUE }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_TOKEN: ${{ secrets.SEQAN_ACTIONS_PAT }} | ||
GH_REPO: ${{ github.repository }} | ||
|
||
- name: Create comment | ||
if: ${{ failure() }} | ||
- name: Find Comment | ||
uses: peter-evans/find-comment@v3 | ||
id: find_comment | ||
with: | ||
issue-number: ${{ env.ISSUE }} | ||
body-includes: ${{ matrix.build }} on ${{ matrix.compiler }} | ||
|
||
- name: Update comment | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
comment-id: ${{ steps.find_comment.outputs.comment-id }} | ||
issue-number: ${{ env.ISSUE }} | ||
body: ${{ steps.comment-body.outputs.body }} | ||
edit-mode: replace | ||
token: ${{ secrets.SEQAN_ACTIONS_PAT }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From e89261cd4f2dfdffe982e8c95af1666acf9cfc47 Mon Sep 17 00:00:00 2001 | ||
From e3f24c7888ab68746b9beb7619a1dd6661a73d71 Mon Sep 17 00:00:00 2001 | ||
From: Enrico Seiler <[email protected]> | ||
Date: Thu, 28 Sep 2023 21:28:37 +0200 | ||
Subject: [PATCH 1/2] [FIX] take_until_view_test | ||
Subject: [PATCH 1/4] [FIX] take_until_view_test | ||
|
||
mutable refers to the capture | ||
--- | ||
|
@@ -27,5 +27,5 @@ index 970a3a1b1..8f34f7014 100644 | |
}); | ||
do_concepts(adapt2, false); | ||
-- | ||
2.42.0 | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From e3eaa3f826fbab51db415d0dd6cbf8a93ecad153 Mon Sep 17 00:00:00 2001 | ||
From cb9c300606e3a4c1860f3195b98f5245f09474e5 Mon Sep 17 00:00:00 2001 | ||
From: Enrico Seiler <[email protected]> | ||
Date: Thu, 28 Sep 2023 19:35:57 +0200 | ||
Subject: [PATCH 2/2] [FIX] Change constexpr test | ||
Subject: [PATCH 2/4] [FIX] Change constexpr test | ||
|
||
gcc11 complains suddenly | ||
--- | ||
|
@@ -21,5 +21,5 @@ index 54bcb640c..460fab223 100644 | |
+ [[maybe_unused]] static constinit auto combined = adaptor1 | adaptor2; | ||
} | ||
-- | ||
2.42.0 | ||
2.43.0 | ||
|
81 changes: 81 additions & 0 deletions
81
test/api_stability/3.3.0/0003-API-hamming-scoring-scheme.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
From 9f061adb903403ee7e039f6480c87d7d1c577c14 Mon Sep 17 00:00:00 2001 | ||
From: Enrico Seiler <[email protected]> | ||
Date: Sun, 28 Jul 2024 15:17:28 +0200 | ||
Subject: [PATCH 3/4] [API] hamming scoring scheme | ||
|
||
--- | ||
.../08_pairwise_alignment/pa_assignment_3_solution.cpp | 6 ++++-- | ||
.../alignment/configuration/align_cfg_method_global.cpp | 6 ++++-- | ||
.../alignment/configuration/minimal_alignment_config.err | 2 +- | ||
.../alignment/configuration/align_config_edit_test.cpp | 8 ++++++-- | ||
4 files changed, 15 insertions(+), 7 deletions(-) | ||
|
||
diff --git a/doc/tutorial/08_pairwise_alignment/pa_assignment_3_solution.cpp b/doc/tutorial/08_pairwise_alignment/pa_assignment_3_solution.cpp | ||
index d9790afca..b761ca884 100644 | ||
--- a/doc/tutorial/08_pairwise_alignment/pa_assignment_3_solution.cpp | ||
+++ b/doc/tutorial/08_pairwise_alignment/pa_assignment_3_solution.cpp | ||
@@ -28,8 +28,10 @@ int main() | ||
seqan3::align_cfg::free_end_gaps_sequence2_leading{true}, | ||
seqan3::align_cfg::free_end_gaps_sequence1_trailing{false}, | ||
seqan3::align_cfg::free_end_gaps_sequence2_trailing{true}} | ||
- | seqan3::align_cfg::scoring_scheme{ | ||
- seqan3::aminoacid_scoring_scheme{seqan3::aminoacid_similarity_matrix::blosum62}}; | ||
+ | seqan3::align_cfg::scoring_scheme{seqan3::aminoacid_scoring_scheme{ | ||
+ seqan3::aminoacid_similarity_matrix::blosum62}} | ||
+ | seqan3::align_cfg::gap_cost_affine{seqan3::align_cfg::open_score{-10}, | ||
+ seqan3::align_cfg::extension_score{-1}}; | ||
|
||
for (auto const & res : seqan3::align_pairwise(source, config)) | ||
seqan3::debug_stream << "Score: " << res.score() << '\n'; | ||
diff --git a/test/snippet/alignment/configuration/align_cfg_method_global.cpp b/test/snippet/alignment/configuration/align_cfg_method_global.cpp | ||
index 0e1f92757..46e74c3dd 100644 | ||
--- a/test/snippet/alignment/configuration/align_cfg_method_global.cpp | ||
+++ b/test/snippet/alignment/configuration/align_cfg_method_global.cpp | ||
@@ -11,8 +11,10 @@ int main() | ||
{ | ||
// configure a global alignment for DNA sequences | ||
auto min_cfg = seqan3::align_cfg::method_global{} | ||
- | seqan3::align_cfg::scoring_scheme{ | ||
- seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, seqan3::mismatch_score{-5}}}; | ||
+ | seqan3::align_cfg::scoring_scheme{seqan3::nucleotide_scoring_scheme{seqan3::match_score{4}, | ||
+ seqan3::mismatch_score{-5}}} | ||
+ | seqan3::align_cfg::gap_cost_affine{seqan3::align_cfg::open_score{-10}, | ||
+ seqan3::align_cfg::extension_score{-1}}; | ||
|
||
auto seq1 = "TCGT"_dna4; | ||
auto seq2 = "ACGA"_dna4; | ||
diff --git a/test/snippet/alignment/configuration/minimal_alignment_config.err b/test/snippet/alignment/configuration/minimal_alignment_config.err | ||
index 7f8f011eb..f599e28b8 100644 | ||
--- a/test/snippet/alignment/configuration/minimal_alignment_config.err | ||
+++ b/test/snippet/alignment/configuration/minimal_alignment_config.err | ||
@@ -1 +1 @@ | ||
-7 | ||
+10 | ||
diff --git a/test/unit/alignment/configuration/align_config_edit_test.cpp b/test/unit/alignment/configuration/align_config_edit_test.cpp | ||
index 7ec211537..ee2e501a8 100644 | ||
--- a/test/unit/alignment/configuration/align_config_edit_test.cpp | ||
+++ b/test/unit/alignment/configuration/align_config_edit_test.cpp | ||
@@ -9,14 +9,18 @@ | ||
|
||
#include <seqan3/alignment/configuration/align_config_edit.hpp> | ||
#include <seqan3/alignment/configuration/align_config_method.hpp> | ||
+#include <seqan3/alphabet/concept.hpp> | ||
+#include <seqan3/alphabet/nucleotide/dna15.hpp> | ||
|
||
TEST(align_cfg_edit, is_hamming) | ||
{ | ||
auto scheme = seqan3::get<seqan3::align_cfg::scoring_scheme>(seqan3::align_cfg::edit_scheme).scheme; | ||
|
||
- for (unsigned i = 0; i < decltype(scheme)::matrix_size; ++i) | ||
+ constexpr uint32_t dna15_size_v = seqan3::alphabet_size<seqan3::dna15>; | ||
+ | ||
+ for (uint32_t i = 0; i < dna15_size_v; ++i) | ||
{ | ||
- for (unsigned j = 0; j < decltype(scheme)::matrix_size; ++j) | ||
+ for (uint32_t j = 0; j < dna15_size_v; ++j) | ||
{ | ||
if (i == j) | ||
EXPECT_EQ((scheme.score(seqan3::assign_rank_to(i, seqan3::dna15{}), | ||
-- | ||
2.43.0 | ||
|
3 changes: 3 additions & 0 deletions
3
test/api_stability/3.3.0/0003-API-hamming-scoring-scheme.patch.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin | ||
SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik | ||
SPDX-License-Identifier: BSD-3-Clause |
43 changes: 43 additions & 0 deletions
43
test/api_stability/3.3.0/0004-FIX-Unsupported-SAM-header.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 72f044049983ad3f2e72ea4342f9573102088479 Mon Sep 17 00:00:00 2001 | ||
From: Enrico Seiler <[email protected]> | ||
Date: Sun, 28 Jul 2024 16:06:27 +0200 | ||
Subject: [PATCH 4/4] [FIX] Unsupported SAM header | ||
|
||
--- | ||
test/unit/io/sam_file/format_sam_test.cpp | 20 ++++++++++---------- | ||
1 file changed, 10 insertions(+), 10 deletions(-) | ||
|
||
diff --git a/test/unit/io/sam_file/format_sam_test.cpp b/test/unit/io/sam_file/format_sam_test.cpp | ||
index 66683ce3b..3cdba0078 100644 | ||
--- a/test/unit/io/sam_file/format_sam_test.cpp | ||
+++ b/test/unit/io/sam_file/format_sam_test.cpp | ||
@@ -174,16 +174,16 @@ TEST_F(sam_format, header_errors) | ||
"@SQ\tSN:ref2\tLN:243199373\tSB:user_tag\tLB:user_tag\tpb:user_tag\n" | ||
"@RG\tID:U0a_A2_L1\tIB:user_tag\tpb:user_tag\n" | ||
"@PG\tID:qc\tIB:user_tag\tPB:user_tag\tCB:user_tag\tDB:user_tag\tVB:user_tag\tpb:user_tag\n"}; | ||
- std::string expected_cerr{"Unsupported SAM header tag in @HD: VB\n" | ||
- "Unsupported SAM header tag in @HD: SB\n" | ||
- "Unsupported SAM header tag in @HD: GB\n" | ||
- "Unsupported SAM header tag in @HD: pb\n" | ||
- "Unsupported SAM header tag in @PG: IB\n" | ||
- "Unsupported SAM header tag in @PG: PB\n" | ||
- "Unsupported SAM header tag in @PG: CB\n" | ||
- "Unsupported SAM header tag in @PG: DB\n" | ||
- "Unsupported SAM header tag in @PG: VB\n" | ||
- "Unsupported SAM header tag in @PG: pb\n"}; | ||
+ std::string expected_cerr{"Unsupported tag found in SAM header @HD: \"VB:user_tag\"\n" | ||
+ "Unsupported tag found in SAM header @HD: \"SB:user_tag\"\n" | ||
+ "Unsupported tag found in SAM header @HD: \"GB:user_tag\"\n" | ||
+ "Unsupported tag found in SAM header @HD: \"pb:user_tag\"\n" | ||
+ "Unsupported tag found in SAM header @PG: \"IB:user_tag\"\n" | ||
+ "Unsupported tag found in SAM header @PG: \"PB:user_tag\"\n" | ||
+ "Unsupported tag found in SAM header @PG: \"CB:user_tag\"\n" | ||
+ "Unsupported tag found in SAM header @PG: \"DB:user_tag\"\n" | ||
+ "Unsupported tag found in SAM header @PG: \"VB:user_tag\"\n" | ||
+ "Unsupported tag found in SAM header @PG: \"pb:user_tag\"\n"}; | ||
std::istringstream istream(header_str); | ||
seqan3::sam_file_input fin{istream, seqan3::format_sam{}}; | ||
|
||
-- | ||
2.43.0 | ||
|
3 changes: 3 additions & 0 deletions
3
test/api_stability/3.3.0/0004-FIX-Unsupported-SAM-header.patch.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin | ||
SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik | ||
SPDX-License-Identifier: BSD-3-Clause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.