Skip to content

Commit

Permalink
Prepare CI for 1.11 release (#599)
Browse files Browse the repository at this point in the history
* set test up for 1.11

* Increase errors for 1.11

* Fix invalidations

* Fix tests

* Update ci.yml

* revert

* Update ci.yml
  • Loading branch information
svchb authored Oct 11, 2024
1 parent 2ccc340 commit eb9f41b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/Invalidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
46 changes: 29 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ on:
- 'docs/**'
workflow_dispatch:


# Cancel redundant CI tests automatically
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -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:
Expand All @@ -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'
Expand All @@ -91,6 +102,7 @@ jobs:
flags: unit
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Run example tests
uses: julia-actions/julia-runtest@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion test/validation/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit eb9f41b

Please sign in to comment.