From eb9f41b832ee1200e45db5b6cbec834745849bcb Mon Sep 17 00:00:00 2001 From: Sven Berger Date: Fri, 11 Oct 2024 16:06:38 +0200 Subject: [PATCH] Prepare CI for 1.11 release (#599) * set test up for 1.11 * Increase errors for 1.11 * Fix invalidations * Fix tests * Update ci.yml * revert * Update ci.yml --- .github/workflows/Invalidations.yml | 3 +- .github/workflows/ci.yml | 46 ++++++++++++++++++----------- test/validation/validation.jl | 3 +- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.github/workflows/Invalidations.yml b/.github/workflows/Invalidations.yml index 9b2831d8c..e2116321e 100644 --- a/.github/workflows/Invalidations.yml +++ b/.github/workflows/Invalidations.yml @@ -18,7 +18,8 @@ jobs: steps: - uses: julia-actions/setup-julia@v2 with: - version: '1' + # TODO: Is broken in 1.11 revert to 1 after fix + version: '1.10' - uses: actions/checkout@v4 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-invalidations@v1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b115c6937..06c868258 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,6 @@ on: - 'docs/**' workflow_dispatch: - # Cancel redundant CI tests automatically concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -38,35 +37,45 @@ jobs: name: Run Tests (Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}) runs-on: ubuntu-latest strategy: - # Don't cancel all running jobs when one job fails fail-fast: false matrix: - version: - - '1.9' - - '1' - os: - - ubuntu-latest - arch: - - x64 - include: - # Also run tests on Windows and macOS-ARM, but only with the latest Julia version - - version: '1' - os: windows-latest - arch: x64 - - version: '1' - os: macos-14 - arch: arm64 + version: + - '1.9' + - '1.10' + - '1' + os: + - ubuntu-latest + arch: + - x64 + include: + # Also run tests on Windows and macOS-ARM, but only with the latest Julia version and 1.10 + - version: '1.10' + os: windows-latest + arch: x64 + - version: '1.10' + os: macos-14 + arch: arm64 + - version: '1' + os: windows-latest + arch: x64 + - version: '1' + os: macos-14 + arch: arm64 steps: - name: Check out project uses: actions/checkout@v4 + - name: Set up Julia uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} + - uses: julia-actions/cache@v2 + - name: Build package uses: julia-actions/julia-buildpkg@v1 + - name: Run unit tests uses: julia-actions/julia-runtest@v1 with: @@ -75,12 +84,14 @@ jobs: coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.version == '1' }} env: TRIXIPARTICLES_TEST: unit + - name: Process coverage results # Only run coverage in one Job (Ubuntu and latest Julia version) if: matrix.os == 'ubuntu-latest' && matrix.version == '1' uses: julia-actions/julia-processcoverage@v1 with: directories: src,test + - name: Upload coverage report to Codecov # Only run coverage in one Job (Ubuntu and latest Julia version) if: matrix.os == 'ubuntu-latest' && matrix.version == '1' @@ -91,6 +102,7 @@ jobs: flags: unit env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Run example tests uses: julia-actions/julia-runtest@v1 with: diff --git a/test/validation/validation.jl b/test/validation/validation.jl index 1ee36f1bd..01efa6b6a 100644 --- a/test/validation/validation.jl +++ b/test/validation/validation.jl @@ -47,13 +47,14 @@ @test sol.retcode == ReturnCode.Success @test count_rhs_allocations(sol, semi) == 0 - if VERSION >= v"1.10" + if VERSION == v"1.10" @test isapprox(error_edac_P1, 0, atol=eps()) @test isapprox(error_edac_P2, 0, atol=eps()) @test isapprox(error_wcsph_P1, 0, atol=eps()) @test isapprox(error_wcsph_P2, 0, atol=eps()) else # 1.9 causes a large difference in the solution + # TODO 1.11 requires a performance hotfix which will likely change these results again @test isapprox(error_edac_P1, 0, atol=4e-9) @test isapprox(error_edac_P2, 0, atol=3e-11) @test isapprox(error_wcsph_P1, 0, atol=26.3)