Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] CI #3293

Merged
merged 3 commits into from
Oct 27, 2024
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
1 change: 0 additions & 1 deletion .github/workflows/ci_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/.ccache
save-always: true
key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/.ccache
save-always: true
key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
uses: actions/cache@v4
with:
path: /home/runner/.ccache
save-always: true
key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.build }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.build }}-${{ matrix.compiler }}-${{ github.ref }}
Expand Down
90 changes: 46 additions & 44 deletions .github/workflows/cron_avx2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,32 @@ defaults:

jobs:
build:
name: ${{ matrix.build }} gcc${{ matrix.compiler }}
name: ${{ matrix.build }} ${{ matrix.compiler }}
runs-on: ubuntu-22.04
timeout-minutes: 300
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
compiler: [11, 12, 13]
compiler: ["clang-18", "clang-17", "gcc-14", "gcc-13", "gcc-12", "gcc-11", "intel"]
build: [unit, snippet, performance, header]

include:
- compiler: "intel"
cxx_flags: "-fp-model=strict -Wno-overriding-option"
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

- 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

- name: Configure tests
run: |
mkdir seqan3-build
cd seqan3-build
cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \
-DSEQAN3_BENCHMARK_MIN_TIME=0.01 \
-DCMAKE_CXX_FLAGS="-mavx2"
mkdir build && cd build
cmake ../test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-mavx2 ${{ matrix.cxx_flags }}" \
-DSEQAN3_BENCHMARK_MIN_TIME=0.01
case "${{ matrix.build }}" in
unit) make gtest_main;;
snippet) make gtest_main;;
Expand All @@ -67,8 +60,8 @@ jobs:
esac

- name: Build tests
working-directory: build
run: |
cd seqan3-build
make -k 2>&1 | tee build.log

- name: Setup Python
Expand All @@ -80,38 +73,47 @@ jobs:
- name: Process Log
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() }}
id: comment-body
run: |
FILE="seqan3/.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
sed -i "s@{{ url }}@$URL@" $FILE
echo "body<<EOF" >> $GITHUB_OUTPUT
cat $FILE >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
if [[ "${{ job.status }}" == "success" ]]; then
echo "body=Success ${{ matrix.build }} on ${{ matrix.compiler }}" >> $GITHUB_OUTPUT
else
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
sed -i "s@{{ url }}@$URL@" $FILE
echo "body<<EOF" >> $GITHUB_OUTPUT
cat $FILE >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
fi

- name: Reopen issue
if: ${{ failure() }}
uses: octokit/request-action@v2.x
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
if: always()
uses: peter-evans/find-comment@v3
id: find_comment
with:
issue-number: ${{ env.ISSUE }}
body-includes: ${{ matrix.build }} on ${{ matrix.compiler }}

- name: Update comment
if: always()
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 }}
11 changes: 7 additions & 4 deletions .github/workflows/cron_latest_libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
name: Latest Libraries

on:
# Will always run on the default branch
schedule:
- cron: "0 4 * * SUN"
# Enables a manual trigger, may run on any branch
workflow_dispatch:

Expand All @@ -23,7 +26,7 @@ defaults:

jobs:
build:
name: ${{ matrix.build }} gcc${{ matrix.compiler }}
name: ${{ matrix.build }} ${{ matrix.compiler }}
runs-on: ubuntu-22.04
timeout-minutes: 300
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -54,9 +57,9 @@ jobs:
- name: Configure tests
run: |
mkdir build && cd build
cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \
-DSEQAN3_BENCHMARK_MIN_TIME=0.01
cmake ../test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \
-DSEQAN3_BENCHMARK_MIN_TIME=0.01
case "${{ matrix.build }}" in
unit) make gtest_main;;
snippet) make gtest_main;;
Expand Down
18 changes: 9 additions & 9 deletions test/performance/range/container_push_back_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ template <typename t>
using sdsl_int_vec = sdsl::int_vector<sizeof(t) * 8>;

template <typename t>
using small_vec = seqan3::small_vector<t, 10'000>;
using small_vec = seqan3::small_vector<t, 10000>;

// ============================================================================
// push_back
// ============================================================================

template <template <typename, typename...> typename container_t, typename alphabet_t, typename... args>
template <template <typename...> typename container_t, typename alphabet_t, typename... args>
void push_back(benchmark::State & state)
{
alphabet_t letter{};

for (auto _ : state)
{
container_t<alphabet_t, args...> container;
for (size_t i = 0; i < 10'000; ++i)
for (size_t i = 0; i < 10000; ++i)
container.push_back(letter);
benchmark::DoNotOptimize(letter = container.back());
}
Expand Down Expand Up @@ -119,7 +119,7 @@ void push_back2(benchmark::State & state)
for (auto _ : state)
{
container_t<alphabet_t, spec_t> container;
for (size_t i = 0; i < 10'000; ++i)
for (size_t i = 0; i < 10000; ++i)
seqan2::appendValue(container, letter);
benchmark::DoNotOptimize(letter = seqan2::back(container));
}
Expand Down Expand Up @@ -159,11 +159,11 @@ BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Packed<>, seqan2::Iupac);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Packed<>, seqan2::AminoAcid);
// BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Packed<>, seqan2::Dna5Q); // broken in SeqAn2

BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5Q);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::Dna);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5Q);

#endif // SEQAN3_HAS_SEQAN2

Expand Down
18 changes: 9 additions & 9 deletions test/performance/range/container_seq_read_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ template <typename t>
using sdsl_int_vec = sdsl::int_vector<sizeof(t) * 8>;

template <typename t>
using small_vec = seqan3::small_vector<t, 10'000>;
using small_vec = seqan3::small_vector<t, 10000>;

// ============================================================================
// sequential_read
// ============================================================================

template <template <typename, typename...> typename container_t,
template <template <typename...> typename container_t,
typename alphabet_t,
bool const_qualified = false,
typename... args>
void sequential_read(benchmark::State & state)
{
container_t<alphabet_t, args...> container = []()
{
auto container = seqan3::test::generate_sequence<alphabet_t>(10'000, 0, 0);
auto container = seqan3::test::generate_sequence<alphabet_t>(10000, 0, 0);
return container_t<alphabet_t, args...>(container.begin(), container.end());
}();

Expand Down Expand Up @@ -178,7 +178,7 @@ template <template <typename...> typename container_t,
bool const_qualified = false>
void sequential_read2(benchmark::State & state)
{
container_t<alphabet_t, spec_t> container{seqan3::test::generate_sequence_seqan2<alphabet_t>(10'000, 0, 0)};
container_t<alphabet_t, spec_t> container{seqan3::test::generate_sequence_seqan2<alphabet_t>(10000, 0, 0)};

using container_reference_t =
std::conditional_t<const_qualified, container_t<alphabet_t, spec_t> const &, container_t<alphabet_t, spec_t> &>;
Expand Down Expand Up @@ -213,11 +213,11 @@ BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Packed<>, seqan2::I
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Packed<>, seqan2::AminoAcid);
// BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Packed<>, seqan2::Dna5Q); // broken in SeqAn2

BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5Q);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::Dna);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5Q);

// ============================================================================
// sequential_read (const)
Expand Down
18 changes: 9 additions & 9 deletions test/performance/range/container_seq_write_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ template <typename t>
using sdsl_int_vec = sdsl::int_vector<sizeof(t) * 8>;

template <typename t>
using small_vec = seqan3::small_vector<t, 10'000>;
using small_vec = seqan3::small_vector<t, 10000>;

// ============================================================================
// sequential_write
// ============================================================================

template <template <typename, typename...> typename container_t, typename alphabet_t, typename... args>
template <template <typename...> typename container_t, typename alphabet_t, typename... args>
void sequential_write(benchmark::State & state)
{
container_t<alphabet_t, args...> container = []()
{
auto container = seqan3::test::generate_sequence<alphabet_t>(10'000, 0, 0);
auto container = seqan3::test::generate_sequence<alphabet_t>(10000, 0, 0);
return container_t<alphabet_t, args...>(container.begin(), container.end());
}();

Expand Down Expand Up @@ -116,7 +116,7 @@ BENCHMARK_TEMPLATE(sequential_write, small_vec, seqan3::alphabet_variant<char, s
template <template <typename...> typename container_t, typename spec_t, typename alphabet_t>
void sequential_write2(benchmark::State & state)
{
container_t<alphabet_t, spec_t> container{seqan3::test::generate_sequence_seqan2<alphabet_t>(10'000, 0, 0)};
container_t<alphabet_t, spec_t> container{seqan3::test::generate_sequence_seqan2<alphabet_t>(10000, 0, 0)};

alphabet_t letter{};
for (auto _ : state)
Expand Down Expand Up @@ -145,11 +145,11 @@ BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Packed<>, seqan2::
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Packed<>, seqan2::AminoAcid);
// BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Packed<>, seqan2::Dna5Q); // broken in SeqAn2

BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5Q);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::Dna);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5Q);

#endif // SEQAN3_HAS_SEQAN2

Expand Down