Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
31 changes: 25 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@ jobs:
with:
annotate: true
# Only run coverage in one Job (Ubuntu and latest Julia version)
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.version == '1' }}
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.version == '1.11' }}
env:
TRIXIPARTICLES_TEST: unit

- name: Process coverage results
- name: Process unit coverage results
# Only run coverage in one Job (Ubuntu and latest Julia version)
if: matrix.os == 'ubuntu-latest' && matrix.version == '1'
if: matrix.os == 'ubuntu-latest' && matrix.version == '1.11'
uses: julia-actions/julia-processcoverage@v1
with:
directories: src,test

- name: Upload coverage report to Codecov
- name: Upload unit coverage report to Codecov
# Only run coverage in one Job (Ubuntu and latest Julia version)
if: matrix.os == 'ubuntu-latest' && matrix.version == '1'
if: matrix.os == 'ubuntu-latest' && matrix.version == '1.11'
uses: codecov/codecov-action@v5
with:
files: lcov.info
Expand All @@ -106,6 +106,25 @@ jobs:
uses: julia-actions/julia-runtest@v1
with:
annotate: true
coverage: false
# Only run coverage in one Job (Ubuntu and latest Julia version)
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.version == '1.11' }}
env:
TRIXIPARTICLES_TEST: examples

- name: Process total coverage results
# Only run coverage in one Job (Ubuntu and latest Julia version)
if: matrix.os == 'ubuntu-latest' && matrix.version == '1.11'
uses: julia-actions/julia-processcoverage@v1
with:
directories: src,test

- name: Upload total coverage report to Codecov
# Only run coverage in one Job (Ubuntu and latest Julia version)
if: matrix.os == 'ubuntu-latest' && matrix.version == '1.11'
uses: codecov/codecov-action@v5
with:
files: lcov.info
fail_ci_if_error: true
flags: total
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
26 changes: 5 additions & 21 deletions test/validation/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,11 @@
@test sol.retcode == ReturnCode.Success
@test count_rhs_allocations(sol, semi) == 0

if Sys.ARCH === :aarch64
# MacOS ARM produces slightly different pressure values than x86.
# Note that pressure values are in the order of 1e5.
@test isapprox(error_edac_P1, 0, atol=eps(1e5))
@test isapprox(error_edac_P2, 0, atol=eps(1e5))
@test isapprox(error_wcsph_P1, 0, atol=eps(1e5))
@test isapprox(error_wcsph_P2, 0, atol=eps(1e5))
elseif VERSION < v"1.11"
# 1.10 produces slightly different pressure values than 1.11
@test isapprox(error_edac_P1, 0, atol=eps(1e5))
@test isapprox(error_edac_P2, 0, atol=eps(1e5))
@test isapprox(error_wcsph_P1, 0, atol=eps(1e5))
@test isapprox(error_wcsph_P2, 0, atol=eps(1e5))
else
# Reference values are computed with 1.11 on x86
@test isapprox(error_wcsph_P1, 0, atol=eps())
@test isapprox(error_wcsph_P2, 0, atol=eps())
# Why are these errors not zero?
@test isapprox(error_edac_P1, 0, atol=eps(1e5))
@test isapprox(error_edac_P2, 0, atol=eps(1e5))
end
# Note that pressure values are in the order of 1e5
@test isapprox(error_wcsph_P1, 0, atol=eps(1e5))
@test isapprox(error_wcsph_P2, 0, atol=eps(1e5))
@test isapprox(error_edac_P1, 0, atol=eps(1e5))
@test isapprox(error_edac_P2, 0, atol=eps(1e5))

# Ignore method redefinitions from duplicate `include("../validation_util.jl")`
@trixi_test_nowarn trixi_include(@__MODULE__,
Expand Down
Loading