Skip to content

Commit

Permalink
build docs with 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsignorelli committed Sep 15, 2024
1 parent 52b40db commit 8873446
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
version: '1.10'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
Expand Down
3 changes: 3 additions & 0 deletions src/fastgtpsa/temptps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ end

# --- overloads for broadcasting compatibility ---
Base.broadcastable(o::TempTPS) = Ref(o)
# NOTE: for some reason, merely overloading this function causes allocations
# in Julia 1.9. This is not the case in 1.10, so presumably this is a bug.
# Therefore, allocation tests only are performed on >=1.10
function Base.setindex!(A::Array{T}, x::TempTPS, i1::Int) where {T<:TPS}
copy!(A[i1], x)
rel_temp!(x)
Expand Down
5 changes: 3 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1510,8 +1510,9 @@ end
@test_opt benchmark_GTPSA3()
end

# allocations only works on 1.10
# maybe 1.9 includes the macro call allocations?
# NOTE: for some reason merely overloading Base.setindex!(A::Array{T}, x::TempTPS, i1::Int) where {T<:TPS},
# in Julia 1.9 causes allocations. This is not the case in 1.10, so presumably this is a bug.
# Therefore, allocation tests only are performed on >=1.10
if VERSION >= v"1.10"

@testset "FastGTPSA - Allocations" begin
Expand Down

0 comments on commit 8873446

Please sign in to comment.