|
| 1 | +name: SeqAn3 AVX2 CI |
| 2 | + |
| 3 | +on: |
| 4 | + # Will always run on the default branch |
| 5 | + schedule: |
| 6 | + - cron: "0 6 * * SUN" |
| 7 | + # Enables a manual trigger, may run on any branch |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: avx2-${{ github.event.pull_request.number || github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +env: |
| 15 | + CMAKE_VERSION: 3.10.3 |
| 16 | + SEQAN3_NO_VERSION_CHECK: 1 |
| 17 | + TZ: Europe/Berlin |
| 18 | + ISSUE: 2905 # Issue number to use for reporting failures |
| 19 | + |
| 20 | +defaults: |
| 21 | + run: |
| 22 | + shell: bash -exo pipefail {0} |
| 23 | + |
| 24 | +jobs: |
| 25 | + build: |
| 26 | + name: ${{ matrix.build }} gcc${{ matrix.compiler }} |
| 27 | + runs-on: ubuntu-20.04 |
| 28 | + timeout-minutes: 300 |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + matrix: |
| 32 | + compiler: [9, 10, 11] |
| 33 | + build: [unit, snippet, performance, header] |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Checkout SeqAn3 |
| 37 | + uses: actions/checkout@v2 |
| 38 | + with: |
| 39 | + path: seqan3 |
| 40 | + submodules: true |
| 41 | + |
| 42 | + - name: Checkout SeqAn2 |
| 43 | + uses: actions/checkout@v2 |
| 44 | + with: |
| 45 | + repository: seqan/seqan |
| 46 | + ref: develop |
| 47 | + path: seqan3/submodules/seqan |
| 48 | + |
| 49 | + - name: Configure APT |
| 50 | + continue-on-error: true |
| 51 | + run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh |
| 52 | + |
| 53 | + - name: Install CMake |
| 54 | + run: bash ./seqan3/.github/workflows/scripts/install_cmake.sh |
| 55 | + |
| 56 | + - name: Install compiler g++-${{ matrix.compiler }} |
| 57 | + run: sudo apt-get install --yes g++-${{ matrix.compiler }} |
| 58 | + |
| 59 | + - name: Configure tests |
| 60 | + env: |
| 61 | + CXX: g++-${{ matrix.compiler }} |
| 62 | + CC: gcc-${{ matrix.compiler }} |
| 63 | + run: | |
| 64 | + mkdir seqan3-build |
| 65 | + cd seqan3-build |
| 66 | + cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \ |
| 67 | + -DSEQAN3_VERBOSE_TESTS=OFF \ |
| 68 | + -DSEQAN3_BENCHMARK_MIN_TIME=0.01 \ |
| 69 | + -DCMAKE_CXX_FLAGS="-mavx2" |
| 70 | + case "${{ matrix.build }}" in |
| 71 | + unit) make -j2 gtest_build;; |
| 72 | + snippet) make -j2 gtest_build;; |
| 73 | + performance) make -j2 gbenchmark_build;; |
| 74 | + header) make -j2 gtest_build gbenchmark_build;; |
| 75 | + esac |
| 76 | +
|
| 77 | + - name: Build tests |
| 78 | + run: | |
| 79 | + cd seqan3-build |
| 80 | + make -k -j2 2>&1 | tee build.log |
| 81 | +
|
| 82 | + - name: Setup Python |
| 83 | + if: ${{ failure() }} |
| 84 | + uses: actions/setup-python@v2 |
| 85 | + with: |
| 86 | + python-version: '3.x' |
| 87 | + |
| 88 | + - name: Process Log |
| 89 | + if: ${{ failure() }} |
| 90 | + run: | |
| 91 | + FILE="seqan3/.github/ISSUE_TEMPLATE/cron_comment_template.md" |
| 92 | + python3 seqan3/.github/workflows/scripts/process_compiler_error_log.py seqan3-build/build.log >> $FILE |
| 93 | +
|
| 94 | + - name: Create comment body |
| 95 | + if: ${{ failure() }} |
| 96 | + id: comment-body |
| 97 | + run: | |
| 98 | + FILE="seqan3/.github/ISSUE_TEMPLATE/cron_comment_template.md" |
| 99 | + URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" |
| 100 | + sed -i "s@{{ build }}@${{ matrix.build }}@" $FILE |
| 101 | + sed -i "s@{{ compiler }}@${{ matrix.compiler }}@" $FILE |
| 102 | + sed -i "s@{{ url }}@$URL@" $FILE |
| 103 | + body=$(cat $FILE) |
| 104 | + body="${body//'%'/'%25'}" |
| 105 | + body="${body//$'\n'/'%0A'}" |
| 106 | + body="${body//$'\r'/'%0D'}" |
| 107 | + echo ::set-output name=body::$body |
| 108 | +
|
| 109 | + - name: Reopen issue |
| 110 | + if: ${{ failure() }} |
| 111 | + |
| 112 | + with: |
| 113 | + route: PATCH /repos/{owner}/{repo}/issues/{issue_number} |
| 114 | + owner: ${{ github.repository_owner }} |
| 115 | + repo: seqan3 |
| 116 | + issue_number: ${{ env.ISSUE }} |
| 117 | + state: "open" |
| 118 | + env: |
| 119 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 120 | + |
| 121 | + - name: Create comment |
| 122 | + if: ${{ failure() }} |
| 123 | + uses: peter-evans/create-or-update-comment@v1 |
| 124 | + with: |
| 125 | + issue-number: ${{ env.ISSUE }} |
| 126 | + body: ${{ steps.comment-body.outputs.body }} |
| 127 | + |
0 commit comments