Skip to content

Commit

Permalink
parallel Coveralls setup (#114)
Browse files Browse the repository at this point in the history
* parallel Coveralls setup

* update doctest filters
  • Loading branch information
ranocha committed Dec 3, 2021
1 parent 2f6ec73 commit 1358920
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 14 deletions.
78 changes: 66 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ concurrency:
jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.sbp_test }} - ${{ matrix.arch }} - ${{ github.event_name }}
name: ${{ matrix.sbp_test }} - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.5'
- '1.6'
- '1'
# - 'nightly'
os:
Expand Down Expand Up @@ -91,19 +91,73 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- uses: coverallsapp/github-action@master
# The standard setup of Coveralls is just annoying for parallel builds, see, e.g.,
# https://github.com/trixi-framework/Trixi.jl/issues/691
# https://github.com/coverallsapp/github-action/issues/47
# https://github.com/coverallsapp/github-action/issues/67
# This standard setup is reproduced below for completeness.
# - uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# flag-name: run-${{ matrix.sbp_test }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}-${{ github.run_id }}
# parallel: true
# path-to-lcov: ./lcov.info
# Instead, we use a more tedious approach:
# - Store all individual coverage files as artifacts (directly below)
# - Download and merge individual coverage reports in another step
# - Upload only the merged coverage report to Coveralls
- shell: bash
run: |
cp ./lcov.info ./lcov-${{ matrix.sbp_test }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}.info
- uses: actions/upload-artifact@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.version }}-${{ matrix.os }}-${{ matrix.sbp_test }}-${{ matrix.arch }}
parallel: true
path-to-lcov: ./lcov.info
name: lcov-${{ matrix.sbp_test }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}
path: ./lcov-${{ matrix.sbp_test }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}.info

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
# The standard setup of Coveralls is just annoying for parallel builds, see, e.g.,
# https://github.com/trixi-framework/Trixi.jl/issues/691
# https://github.com/coverallsapp/github-action/issues/47
# https://github.com/coverallsapp/github-action/issues/67
# This standard setup is reproduced below for completeness.
# - name: Coveralls Finished
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel-finished: true
# Instead, we use the more tedious approach described above.
# At first, we check out the repository and download all artifacts
# (and list files for debugging).
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- run: ls -R
# Next, we merge the individual coverage files and upload
# the combined results to Coveralls.
- name: Merge lcov files using Coverage.jl
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.activate(temp=true)
Pkg.add("Coverage")
using Coverage
coverage = LCOV.readfolder(".")
for cov in coverage
cov.filename = replace(cov.filename, "\\" => "/")
end
coverage = merge_coverage_counts(coverage)
@show covered_lines, total_lines = get_summary(coverage)
LCOV.writefile("./lcov.info", coverage)
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
# Upload merged coverage data as artifact for debugging
- uses: actions/upload-artifact@v2
with:
name: lcov
path: ./lcov.info
# That's it
- run: echo "Finished testing SummationByPartsOperators"
2 changes: 1 addition & 1 deletion docs/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ The boundary operators are represented matrix-free via
[`derivative_left`](@ref) and [`derivative_right`](@ref) for zeroth-order
derivatives.

```jldoctest
```jldoctest; filter = r"((┌.*[\n\r]+)(│ `LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead\.*[\n\r]+)(│.*[\n\r]+)(└.*[\n\r]+))"
julia> using SummationByPartsOperators, LinearAlgebra

julia> D = derivative_operator(MattssonNordström2004(), derivative_order=1, accuracy_order=2,
Expand Down
2 changes: 1 addition & 1 deletion src/SummationByPartsOperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ using FFTW
using LoopVectorization: LoopVectorization, @turbo, @tturbo
using RecursiveArrayTools: recursive_bottom_eltype
using Reexport: @reexport
using Requires
using Requires: @require
using StaticArrays
using UnPack: @unpack
using Unrolled
Expand Down

0 comments on commit 1358920

Please sign in to comment.