Skip to content

Commit 279b363

Browse files
authored
Merge pull request #477 from JuliaSparse/kc/backport_aqua
Backport Aqua fixes to 1.10.
2 parents c19b9f0 + 4ddb0bf commit 279b363

File tree

6 files changed

+65
-5
lines changed

6 files changed

+65
-5
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
CompatHelper:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v1
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
- run: julia --color=yes .ci/test_and_change_uuid.jl
5353
- uses: julia-actions/julia-buildpkg@v1
5454
- uses: julia-actions/julia-runtest@v1
55+
env:
56+
SPARSEARRAYS_AQUA_TEST: true
5557
- uses: julia-actions/julia-processcoverage@v1
5658
- uses: codecov/codecov-action@v1
5759
with:

Project.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
1010
SuiteSparse_jll = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
1111

1212
[compat]
13+
Aqua = "0.7, 0.8"
14+
Dates = "<0.0.1, 1"
15+
InteractiveUtils = "<0.0.1, 1"
16+
Libdl = "<0.0.1, 1"
17+
LinearAlgebra = "<0.0.1, 1"
18+
Pkg = "<0.0.1, 1"
19+
Printf = "<0.0.1, 1"
20+
Random = "<0.0.1, 1"
21+
Serialization = "<0.0.1, 1"
1322
SuiteSparse_jll = "7.2.1"
23+
Test = "<0.0.1, 1"
1424
julia = "1.10"
1525

1626
[extras]

test/ambiguous.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ if Base.find_package("Aqua") === nothing
1414
@debug "Installing Aqua.jl for SparseArrays.jl tests"
1515
iob = IOBuffer()
1616
try
17-
Pkg.add("Aqua", io=iob) # Needed for custom julia version resolve tests
17+
# TODO: make this version tie to compat in Project.toml
18+
# or do this another safer way
19+
Pkg.add(name="Aqua", version="0.8", io=iob) # Needed for custom julia version resolve tests
1820
catch
1921
println(String(take!(iob)))
2022
rethrow()
@@ -42,9 +44,7 @@ using Test, LinearAlgebra, SparseArrays, Aqua
4244
@testset "Compat bounds" begin
4345
Aqua.test_deps_compat(SparseArrays)
4446
end
45-
@testset "Project.toml formatting" begin
46-
Aqua.test_project_toml_formatting(SparseArrays)
47-
end
47+
4848
@testset "Piracy" begin
4949
@test_broken Aqua.Piracy.hunt(SparseArrays) == Method[]
5050
end

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# This file is a part of Julia. License is MIT: https://julialang.org/license
22
using Test, LinearAlgebra, SparseArrays
33

4+
if Base.get_bool_env("SPARSEARRAYS_AQUA_TEST", false)
5+
include("ambiguous.jl")
6+
end
7+
48
for file in readlines(joinpath(@__DIR__, "testgroups"))
59
file == "" && continue # skip empty lines
610
include(file * ".jl")

test/testgroups

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
allowscalar
2-
ambiguous
32
cholmod
43
fixed
54
higherorderfns

0 commit comments

Comments
 (0)