diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..d60f0707f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "monthly" diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml new file mode 100644 index 000000000..b1c0a4f15 --- /dev/null +++ b/.github/workflows/Documenter.yml @@ -0,0 +1,25 @@ +name: Documentation + +on: [push, pull_request] + +# Cancel redundant CI tests automatically +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: '1.10' + - uses: julia-actions/cache@v2 + - name: Install dependencies + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key + run: julia --project=docs/ docs/make.jl diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml new file mode 100644 index 000000000..75eeeba91 --- /dev/null +++ b/.github/workflows/Downgrade.yml @@ -0,0 +1,37 @@ +name: Downgrade + +on: [pull_request, workflow_dispatch] + +# Cancel redundant CI tests automatically +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + downgrade: + name: Downgrade ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.8' # Needs to be lowest supported version + os: + - ubuntu-latest + arch: + - x64 + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)' + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-downgrade-compat@v1 + with: # As per documentation, we exclude packages within the Julia standard library + skip: LinearAlgebra,SparseArrays,Random,Statistics,Test + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + with: + coverage: false diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e7c29485a..4617dfc91 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -26,6 +26,11 @@ jobs: - x64 steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: | + git fetch --tags + git branch --create-reflog main origin/main - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c0b104cb..9d46d8f7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,42 +1,51 @@ name: CI -on: [push, pull_request] + +on: [push, pull_request, workflow_dispatch] + +# Cancel redundant CI tests automatically +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - test: + test: # Main CI tests name: Tests ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false - matrix: + matrix: # Main tests for linux version: - '1.8' + - '1.9' + - '1.10' os: - ubuntu-latest arch: - x64 + - x86 + include: # Test macos/windows on latest LTS + - version: '1.10' + os: macos-latest + arch: aarch64 + - version: '1.10' + os: windows-latest + arch: x64 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v4 with: file: lcov.info + verbose: true token: ${{ secrets.CODECOV_TOKEN }} - + drivers: name: Drivers ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} @@ -44,54 +53,22 @@ jobs: fail-fast: false matrix: version: - - '1.8' + - '1.10' os: - ubuntu-latest arch: - x64 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - run: | julia --color=yes --project=. --check-bounds=yes --depwarn=error -e ' using Pkg; Pkg.instantiate()' - run: | julia --color=yes --project=. --check-bounds=yes --depwarn=error -e ' - (1,) .== 1; include("test/GridapTests/runtests.jl")' - - docs: - name: Documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: '1.8' - - run: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' -# - run: | -# julia --project=docs -e ' -# using Documenter: doctest -# using Gridap -# doctest(Gridap)' - - run: julia --project=docs docs/make.jl - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + include("test/GridapTests/runtests.jl")' diff --git a/.github/workflows/ci_x86.yml b/.github/workflows/ci_x86.yml deleted file mode 100644 index 03ca2ab11..000000000 --- a/.github/workflows/ci_x86.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: CI_X86 -on: - push: - branches: - - master - pull_request: - branches: - - master -jobs: - test: - name: Tests ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - version: - - '1.8' - os: - - ubuntu-latest - arch: - - x86 - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 diff --git a/Project.toml b/Project.toml index 994891294..14540d3da 100644 --- a/Project.toml +++ b/Project.toml @@ -34,32 +34,32 @@ WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192" [compat] AbstractTrees = "0.3.3, 0.4" Aqua = "0.8" -BSON = "0.2.5, 0.3" -BlockArrays = "0.12.12, 0.13, 0.14, 0.15, 0.16, 1" -Combinatorics = "1.0.0" +BSON = "0.3.4" +BlockArrays = "1" +Combinatorics = "1" DataStructures = "0.18.13" DocStringExtensions = "0.8.1, 0.9" -FastGaussQuadrature = "0.4.2, 1" -FileIO = "1.2.2, 1.3, 1.4" -FillArrays = "0.8.4, 0.9, 0.10, 0.11, 0.12, 0.13, 1" -ForwardDiff = "0.10.10" -JLD2 = "0.1.11, 0.3, 0.4, 0.5" -JSON = "0.21.0" +FastGaussQuadrature = "0.4.5, 1" +FileIO = "1.5" +FillArrays = "1.11" +ForwardDiff = "0.10.14" +JLD2 = "0.5" +JSON = "0.21" LineSearches = "7.0.1" LinearAlgebra = "1" -NLsolve = "4.3.0" +NLsolve = "4.5.1" NearestNeighbors = "0.4.8" -PolynomialBases = "0.4.12" +PolynomialBases = "0.4.13" Preferences = "1.4" -QuadGK = "2.3.1, 2.4" +QuadGK = "2.4" Random = "1" SparseArrays = "1" SparseMatricesCSR = "0.6.4" -StaticArrays = "0.12.1, 1.0" +StaticArrays = "1.4" Statistics = "1" Test = "1" -WriteVTK = "1.12.0" -julia = "1.3" +WriteVTK = "1.21.1" +julia = "1.6" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" diff --git a/src/Algebra/AlgebraInterfaces.jl b/src/Algebra/AlgebraInterfaces.jl index 44298b2f8..d3919cfb4 100644 --- a/src/Algebra/AlgebraInterfaces.jl +++ b/src/Algebra/AlgebraInterfaces.jl @@ -223,26 +223,7 @@ end Matrix multiply a*b and add to result to c. Returns c. """ -function muladd!(c,a,b) - _muladd!(c,a,b) - c -end - -@static if VERSION >= v"1.3" - function _muladd!(c,a,b) - mul!(c,a,b,1,1) - end -else - function _muladd!(c,a,b) - @assert length(c) == size(a,1) - @assert length(b) == size(a,2) - @inbounds for j in 1:size(a,2) - for i in 1:size(a,1) - c[i] += a[i,j]*b[j] - end - end - end -end +muladd!(b,A,x) = mul!(b,A,x,one(eltype(b)),one(eltype(b))) """ axpy_entries!(α::Number, A::T, B::T) where {T<: AbstractMatrix} -> T diff --git a/src/CellData/CellData.jl b/src/CellData/CellData.jl index 19624ec27..d96ecca48 100644 --- a/src/CellData/CellData.jl +++ b/src/CellData/CellData.jl @@ -9,6 +9,10 @@ using Test using DocStringExtensions using FillArrays +using NearestNeighbors +using StaticArrays +using DataStructures + using Gridap.Helpers using Gridap.Algebra using Gridap.Arrays @@ -17,9 +21,6 @@ using Gridap.Fields using Gridap.ReferenceFEs using Gridap.Geometry -using NearestNeighbors -using StaticArrays - import Gridap.Arrays: lazy_append import Gridap.Arrays: get_array import Gridap.Arrays: evaluate! diff --git a/src/CellData/DomainContributions.jl b/src/CellData/DomainContributions.jl index 3487f7c12..fbe9358d8 100644 --- a/src/CellData/DomainContributions.jl +++ b/src/CellData/DomainContributions.jl @@ -1,4 +1,3 @@ -using DataStructures """ """ diff --git a/src/ODEs/TransientFESpaces.jl b/src/ODEs/TransientFESpaces.jl index 75a55a54c..2b5d77869 100644 --- a/src/ODEs/TransientFESpaces.jl +++ b/src/ODEs/TransientFESpaces.jl @@ -149,10 +149,7 @@ Arrays.evaluate!(transient_space::FESpace, space::FESpace, t::Real) = space Arrays.evaluate(space::FESpace, t::Real) = space Arrays.evaluate(space::FESpace, t::Nothing) = space -# TODO why is this needed? -@static if VERSION >= v"1.3" - (space::FESpace)(t) = evaluate(space, t) -end +(space::FESpace)(t) = evaluate(space, t) (space::TrialFESpace)(t) = evaluate(space, t) (space::ZeroMeanFESpace)(t) = evaluate(space, t) diff --git a/test/AdaptivityTests/MacroFEStokesTests.jl b/test/AdaptivityTests/MacroFEStokesTests.jl index 2dfe2c53b..607ddc521 100644 --- a/test/AdaptivityTests/MacroFEStokesTests.jl +++ b/test/AdaptivityTests/MacroFEStokesTests.jl @@ -14,7 +14,7 @@ function main(Dc,reftype) p_sol(x) = x[1] - 1.0/2.0 domain = (Dc == 2) ? (0,1,0,1) : (0,1,0,1,0,1) - nc = (Dc == 2) ? (2,2) : (1,1,1) + nc = (Dc == 2) ? (1,1) : (1,1,1) model = simplexify(CartesianDiscreteModel(domain,nc)) poly = (Dc == 2) ? TRI : TET @@ -65,7 +65,7 @@ end main(2,:barycentric) #main(2,:powellsabin) -main(3,:barycentric) +#main(3,:barycentric) #main(3,:powellsabin) end # module \ No newline at end of file diff --git a/test/ArraysTests/TablesTests.jl b/test/ArraysTests/TablesTests.jl index a292ccf35..546dae528 100644 --- a/test/ArraysTests/TablesTests.jl +++ b/test/ArraysTests/TablesTests.jl @@ -171,6 +171,4 @@ f = joinpath(d,"a.jld2") to_jld2_file(a,f) @test a == from_jld2_file(typeof(a),f) -rm(d,recursive=true) - end # module diff --git a/test/GeometryTests/DiscreteModelsTests.jl b/test/GeometryTests/DiscreteModelsTests.jl index 66b6ae993..85c43da4a 100644 --- a/test/GeometryTests/DiscreteModelsTests.jl +++ b/test/GeometryTests/DiscreteModelsTests.jl @@ -107,6 +107,4 @@ to_json_file(model2,filename) model3 = DiscreteModelFromFile(filename) test_discrete_model(model3) -rm(d,recursive=true) - end # module diff --git a/test/GeometryTests/FaceLabelingsTests.jl b/test/GeometryTests/FaceLabelingsTests.jl index d2631d8fd..25c9f2360 100644 --- a/test/GeometryTests/FaceLabelingsTests.jl +++ b/test/GeometryTests/FaceLabelingsTests.jl @@ -64,8 +64,6 @@ labels2 = from_jld2_file(typeof(labels),f) @test labels2.tag_to_entities == labels.tag_to_entities @test labels2.tag_to_name == labels.tag_to_name -rm(d,recursive=true) - @test get_tags_from_names(labels,["interior","all"]) == [1,3] face_to_mask = get_face_mask(labels,"interior",1) diff --git a/test/GeometryTests/UnstructuredDiscreteModelsTests.jl b/test/GeometryTests/UnstructuredDiscreteModelsTests.jl index 413bc79c1..f1a9287a9 100644 --- a/test/GeometryTests/UnstructuredDiscreteModelsTests.jl +++ b/test/GeometryTests/UnstructuredDiscreteModelsTests.jl @@ -53,6 +53,4 @@ model2 == from_jld2_file(typeof(model),f) @test model.grid_topology.polytopes == model2.grid_topology.polytopes @test model.grid_topology.vertex_coordinates == model2.grid_topology.vertex_coordinates -rm(d,recursive=true) - end # module diff --git a/test/GeometryTests/UnstructuredGridsTests.jl b/test/GeometryTests/UnstructuredGridsTests.jl index 8a30b5c3a..e774700bc 100644 --- a/test/GeometryTests/UnstructuredGridsTests.jl +++ b/test/GeometryTests/UnstructuredGridsTests.jl @@ -122,6 +122,4 @@ grid2 = from_jld2_file(typeof(grid),f) @test grid.node_coordinates == grid2.node_coordinates @test grid.reffes == grid2.reffes -rm(d,recursive=true) - end # module diff --git a/test/GridapTests/issue_778.jl b/test/GridapTests/issue_778.jl index 3318e0155..e6de82d48 100644 --- a/test/GridapTests/issue_778.jl +++ b/test/GridapTests/issue_778.jl @@ -16,6 +16,4 @@ model = CartesianDiscreteModel(domain,cells,isperiodic=(true,false)) model = simplexify(model) writevtk(model,joinpath(d,"tmp_model_2")) -rm(d,recursive=true) - end # module diff --git a/test/IoTests/BsonTests.jl b/test/IoTests/BsonTests.jl index 68bf0a870..575c98446 100644 --- a/test/IoTests/BsonTests.jl +++ b/test/IoTests/BsonTests.jl @@ -34,8 +34,6 @@ f = joinpath(d,"foo.bson") to_bson_file(foo,f) @test foo == from_bson_file(Foo,f) -rm(d,recursive=true) - end # module diff --git a/test/IoTests/JLD2Tests.jl b/test/IoTests/JLD2Tests.jl index 6386b4519..474b1930d 100644 --- a/test/IoTests/JLD2Tests.jl +++ b/test/IoTests/JLD2Tests.jl @@ -24,6 +24,4 @@ foo = Dict("a"=>Int32(1),2=>Int(3),4.0=>Float32(5),"six"=>Float64(7),:s=>"Symbol to_jld2_file(foo,f) @test foo == from_jld2_file(typeof(foo),f) -rm(d,recursive=true) - end # module diff --git a/test/IoTests/JsonTests.jl b/test/IoTests/JsonTests.jl index 73d072f6c..52b960424 100644 --- a/test/IoTests/JsonTests.jl +++ b/test/IoTests/JsonTests.jl @@ -33,8 +33,6 @@ d = mktempdir() f = joinpath(d,"foo.json") to_json_file(foo,f) @test foo == from_json_file(Foo,f) -rm(d,recursive=true) - @test foo == from_json(Foo,JSON.json(foo)) end # module diff --git a/test/ReferenceFEsTests/CLagrangianRefFEsTests.jl b/test/ReferenceFEsTests/CLagrangianRefFEsTests.jl index 1723b85ab..f2c6204f0 100644 --- a/test/ReferenceFEsTests/CLagrangianRefFEsTests.jl +++ b/test/ReferenceFEsTests/CLagrangianRefFEsTests.jl @@ -220,6 +220,4 @@ f = joinpath(d,"reffe.jld2") to_jld2_file(reffe,f) @test reffe == from_jld2_file(typeof(reffe),f) -rm(d,recursive=true) - end # module diff --git a/test/ReferenceFEsTests/NedelecRefFEsTests.jl b/test/ReferenceFEsTests/NedelecRefFEsTests.jl index 8a312bde6..1e0db175c 100644 --- a/test/ReferenceFEsTests/NedelecRefFEsTests.jl +++ b/test/ReferenceFEsTests/NedelecRefFEsTests.jl @@ -177,6 +177,5 @@ gndat = ["g$i"=>gux[:,i] for i in 1:num_dofs(reffe)] d = mktempdir() f = joinpath(d, "nede_tet_1") writevtk(grid,f,nodaldata=vcat(ndat,gndat)) -rm(d,recursive=true) end # module diff --git a/test/TensorValuesTests/TypesTests.jl b/test/TensorValuesTests/TypesTests.jl index 7306be651..bb1dfd073 100644 --- a/test/TensorValuesTests/TypesTests.jl +++ b/test/TensorValuesTests/TypesTests.jl @@ -181,11 +181,11 @@ q = SymTracelessTensorValue{0,Int}() q = SymTracelessTensorValue{1,Int}( () ) @test isa(q,SymTracelessTensorValue{1,Int}) -@test convert(SMatrix{1,1,Int},q) == [0;;] +@test convert(SMatrix{1,1,Int},q) == zeros(Int,1,1) q = SymTracelessTensorValue{1,Int}() @test isa(q,SymTracelessTensorValue{1,Int}) -@test convert(SMatrix{1,1,Int},q) == [0;;] +@test convert(SMatrix{1,1,Int},q) == zeros(Int,1,1) q = SymTracelessTensorValue(11,21.0) @test isa(q,SymTracelessTensorValue{2,Float64}) diff --git a/test/VisualizationTests/VtkTests.jl b/test/VisualizationTests/VtkTests.jl index af9ad91c4..f3e837f20 100644 --- a/test/VisualizationTests/VtkTests.jl +++ b/test/VisualizationTests/VtkTests.jl @@ -202,7 +202,4 @@ vtk_save(pvtk) pvtk = create_pvtk_file(Ω2,f; part=2, nparts=2,celldata=["u"=>rand(num_cells(Ω2))]) vtk_save(pvtk) - -rm(d,recursive=true) - end # module