-
Notifications
You must be signed in to change notification settings - Fork 82
147 lines (126 loc) · 4.73 KB
/
cron_latest_libraries.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# 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: 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:
concurrency:
group: libs-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
SEQAN3_NO_VERSION_CHECK: 1
TZ: Europe/Berlin
ISSUE: 2747 # Issue number to use for reporting failures
defaults:
run:
shell: bash -Eexuo pipefail {0}
jobs:
build:
name: ${{ matrix.build }} gcc${{ 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]
build: [unit, snippet, performance, header]
include:
- compiler: 12
build: unit
cxx_flags: "-Wno-restrict" # Bogus errors in gtest that won't be fixed upstream
steps:
- name: Checkout SeqAn3
uses: actions/checkout@v4
with:
path: seqan3
submodules: true
- name: Update all submodules
run: |
cd seqan3
git submodule status
git submodule update --recursive --remote
git submodule status
- name: Update googletest
run: |
grep 'SEQAN3_GTEST_TAG ".*"' seqan3/test/cmake/seqan3_require_test.cmake
sed -i 's/SEQAN3_GTEST_TAG ".*"/SEQAN3_GTEST_TAG "main"/' seqan3/test/cmake/seqan3_require_test.cmake
grep 'SEQAN3_GTEST_TAG ".*"' seqan3/test/cmake/seqan3_require_test.cmake
- name: Update googlebenchmark
run: |
grep 'SEQAN3_BENCHMARK_TAG ".*"' seqan3/test/cmake/seqan3_require_benchmark.cmake
sed -i 's/SEQAN3_BENCHMARK_TAG ".*"/SEQAN3_BENCHMARK_TAG "main"/' seqan3/test/cmake/seqan3_require_benchmark.cmake
grep 'SEQAN3_BENCHMARK_TAG ".*"' seqan3/test/cmake/seqan3_require_benchmark.cmake
- name: Checkout SeqAn2
uses: actions/checkout@v4
with:
repository: seqan/seqan
path: seqan3/submodules/seqan
- 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 \
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" \
-DSEQAN3_BENCHMARK_MIN_TIME=0.01
case "${{ matrix.build }}" in
unit) make -j2 gtest_build;;
snippet) make -j2 gtest_build;;
performance) make -j2 gbenchmark_build;;
header) make -j2 gtest_build gbenchmark_build;;
esac
- name: Build tests
run: |
cd seqan3-build
make -k -j2 2>&1 | tee build.log
- name: Setup Python
if: ${{ failure() }}
uses: actions/setup-python@v5
with:
python-version: '3.x'
- 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
- 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
- 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"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create comment
if: ${{ failure() }}
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ env.ISSUE }}
body: ${{ steps.comment-body.outputs.body }}