Skip to content

Commit

Permalink
update CI to Julia v1.7 and fix tests (#58)
Browse files Browse the repository at this point in the history
* update CI to Julia v1.7 and fix tests

* Update Project.toml

* use newer ORdinaryDiffEq.jl in tests

Co-authored-by: Michael Schlottke-Lakemper <[email protected]>
  • Loading branch information
ranocha and sloede authored Nov 25, 2022
1 parent 3a78c57 commit 22d5e82
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6'
- '1.7'
# - 'nightly'
os:
- ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Trixi2Vtk"
uuid = "bc1476a1-1ca6-4cc3-950b-c312b255ff95"
authors = ["Michael Schlottke-Lakemper <[email protected].de>"]
authors = ["Michael Schlottke-Lakemper <[email protected]>", "Hendrik Ranocha <mail@ranocha.de>"]
version = "0.3.9-pre"

[deps]
Expand All @@ -20,4 +20,4 @@ StaticArrays = "0.12, 1.0"
TimerOutputs = "0.5"
Trixi = "0.4"
WriteVTK = "1.7"
julia = "1.6"
julia = "1.7"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ generate publication-quality visualizations. Trixi2Vtk is part of the
## Installation
If you have not yet installed Julia, please [follow the instructions for your
operating system](https://julialang.org/downloads/platform/). Trixi2Vtk works
with Julia v1.5.
with Julia v1.7.

Trixi2Vtk is a registered Julia package. Hence, you can install it by executing
the following commands in the Julia REPL:
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"

[compat]
Documenter = "0.27"
OrdinaryDiffEq = "5.44"
OrdinaryDiffEq = "6"
Trixi = "0.4"
8 changes: 4 additions & 4 deletions test/test_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ end
@testset "2D" begin
@testset "TreeMesh" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath("tree_2d_dgsem", "elixir_advection_extended.jl"), maxiters=1)
run_trixi(joinpath(examples_dir(), "tree_2d_dgsem", "elixir_advection_extended.jl"), maxiters=1)

@timed_testset "uniform mesh" begin
if Sys.iswindows()
Expand Down Expand Up @@ -75,7 +75,7 @@ end

@testset "StructuredMesh" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath("structured_2d_dgsem", "elixir_advection_waving_flag.jl"), maxiters=1)
run_trixi(joinpath(examples_dir(), "structured_2d_dgsem", "elixir_advection_waving_flag.jl"), maxiters=1)

@timed_testset "waving flag" begin
if Sys.isapple()
Expand Down Expand Up @@ -122,7 +122,7 @@ end

@testset "UnstructuredMesh2D" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath("unstructured_2d_dgsem", "elixir_euler_basic.jl"), maxiters=1)
run_trixi(joinpath(examples_dir(), "unstructured_2d_dgsem", "elixir_euler_basic.jl"), maxiters=1)

@timed_testset "basic" begin
if Sys.isapple()
Expand All @@ -148,7 +148,7 @@ end

@testset "P4estMesh" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath("p4est_2d_dgsem", "elixir_euler_source_terms_nonconforming_unstructured_flag.jl"), initial_refinement_level=0, maxiters=1)
run_trixi(joinpath(examples_dir(), "p4est_2d_dgsem", "elixir_euler_source_terms_nonconforming_unstructured_flag.jl"), initial_refinement_level=0, maxiters=1)

@timed_testset "nonperiodic" begin
if Sys.isapple()
Expand Down
6 changes: 3 additions & 3 deletions test/test_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ end
@testset "3D" begin
@testset "TreeMesh" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath("tree_3d_dgsem", "elixir_advection_extended.jl"), maxiters=1)
run_trixi(joinpath(examples_dir(), "tree_3d_dgsem", "elixir_advection_extended.jl"), maxiters=1)

@timed_testset "uniform mesh" begin
test_trixi2vtk("solution_000000.h5", outdir,
Expand All @@ -40,7 +40,7 @@ end

@testset "StructuredMesh" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath("structured_3d_dgsem", "elixir_advection_basic.jl"), maxiters=1)
run_trixi(joinpath(examples_dir(), "structured_3d_dgsem", "elixir_advection_basic.jl"), maxiters=1)

@timed_testset "basic" begin
if Sys.isapple()
Expand All @@ -66,7 +66,7 @@ end

@testset "P4estMesh" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath("p4est_3d_dgsem", "elixir_advection_amr_unstructured_curved.jl"), maxiters=1)
run_trixi(joinpath(examples_dir(), "p4est_3d_dgsem", "elixir_advection_amr_unstructured_curved.jl"), maxiters=1)

@timed_testset "unstructured curved" begin
if Sys.isapple()
Expand Down
2 changes: 1 addition & 1 deletion test/test_manual.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ isdir(outdir) && rm(outdir, recursive=true)

@timed_testset "trixi2vtk error triggers" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath("tree_2d_dgsem", "elixir_advection_extended.jl"), maxiters=1)
run_trixi(joinpath(examples_dir(), "tree_2d_dgsem", "elixir_advection_extended.jl"), maxiters=1)

@testset "no input file" begin
@test_throws ErrorException trixi2vtk()
Expand Down
10 changes: 4 additions & 6 deletions test/test_trixi2vtk.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using Test: @test_nowarn, @test, @testset
using Test: @test_nowarn, @test, @testset, @test_skip
using SHA
using Trixi
using Trixi2Vtk

# pathof(Trixi) returns /path/to/Trixi/src/Trixi.jl, dirname gives the parent directory
const EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples")


function run_trixi(elixir; parameters...)
@test_nowarn trixi_include(joinpath(EXAMPLES_DIR, elixir); parameters...)
function run_trixi(elixir; kwargs...)
# evaluate examples in the scope of the module they're called from
trixi_include(@__MODULE__, elixir; kwargs...)
end


Expand Down

0 comments on commit 22d5e82

Please sign in to comment.