Skip to content

Commit

Permalink
Merge pull request #477 from JuliaSparse/kc/backport_aqua
Browse files Browse the repository at this point in the history
Backport Aqua fixes to 1.10.
  • Loading branch information
KristofferC authored Nov 27, 2023
2 parents c19b9f0 + 4ddb0bf commit 279b363
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 5 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CompatHelper
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Check if Julia is already available in the PATH
id: julia_in_path
run: which julia
continue-on-error: true
- name: Install Julia, but only if it is not already available in the PATH
uses: julia-actions/setup-julia@v1
with:
version: '1'
arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: "Add the General registry via Git"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
name = "CompatHelper"
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
version = "3"
Pkg.add(; name, uuid, version)
shell: julia --color=yes {0}
- name: "Run CompatHelper"
run: |
import CompatHelper
CompatHelper.main()
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
- run: julia --color=yes .ci/test_and_change_uuid.jl
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
SPARSEARRAYS_AQUA_TEST: true
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
Expand Down
10 changes: 10 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
SuiteSparse_jll = "bea87d4a-7f5b-5778-9afe-8cc45184846c"

[compat]
Aqua = "0.7, 0.8"
Dates = "<0.0.1, 1"
InteractiveUtils = "<0.0.1, 1"
Libdl = "<0.0.1, 1"
LinearAlgebra = "<0.0.1, 1"
Pkg = "<0.0.1, 1"
Printf = "<0.0.1, 1"
Random = "<0.0.1, 1"
Serialization = "<0.0.1, 1"
SuiteSparse_jll = "7.2.1"
Test = "<0.0.1, 1"
julia = "1.10"

[extras]
Expand Down
8 changes: 4 additions & 4 deletions test/ambiguous.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ if Base.find_package("Aqua") === nothing
@debug "Installing Aqua.jl for SparseArrays.jl tests"
iob = IOBuffer()
try
Pkg.add("Aqua", io=iob) # Needed for custom julia version resolve tests
# TODO: make this version tie to compat in Project.toml
# or do this another safer way
Pkg.add(name="Aqua", version="0.8", io=iob) # Needed for custom julia version resolve tests
catch
println(String(take!(iob)))
rethrow()
Expand Down Expand Up @@ -42,9 +44,7 @@ using Test, LinearAlgebra, SparseArrays, Aqua
@testset "Compat bounds" begin
Aqua.test_deps_compat(SparseArrays)
end
@testset "Project.toml formatting" begin
Aqua.test_project_toml_formatting(SparseArrays)
end

@testset "Piracy" begin
@test_broken Aqua.Piracy.hunt(SparseArrays) == Method[]
end
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license
using Test, LinearAlgebra, SparseArrays

if Base.get_bool_env("SPARSEARRAYS_AQUA_TEST", false)
include("ambiguous.jl")
end

for file in readlines(joinpath(@__DIR__, "testgroups"))
file == "" && continue # skip empty lines
include(file * ".jl")
Expand Down
1 change: 0 additions & 1 deletion test/testgroups
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
allowscalar
ambiguous
cholmod
fixed
higherorderfns
Expand Down

0 comments on commit 279b363

Please sign in to comment.