Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
strategy:
fail-fast: false
matrix:
version:
- 'lts'
- '1'
- 'pre'
os:
- ubuntu-latest
arch:
- x64
uses: "SciML/.github/.github/workflows/tests.yml@v1"
with:
julia-version: ${{ matrix.version }}
julia-arch: ${{ matrix.arch }}
os: ${{ matrix.os }}
tests:
uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1"
secrets: "inherit"
5 changes: 2 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ EnzymeCore = "0.5.3,0.6,0.7,0.8"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "ChainRulesCore", "EnzymeCore", "JET", "Setfield", "Test"]
test = ["ChainRulesCore", "EnzymeCore", "Pkg", "Setfield", "Test"]
17 changes: 17 additions & 0 deletions test/qa/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
ADTypes = {path = "../.."}

[compat]
ADTypes = "1"
Aqua = "0.8"
JET = "0.9, 0.10, 0.11"
Pkg = "1"
Test = "1"
julia = "1.10"
12 changes: 12 additions & 0 deletions test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using ADTypes
using Aqua: Aqua
using JET: JET
using Test

@testset "Aqua.jl" begin
Aqua.test_all(ADTypes; deps_compat = (check_extras = false,))
end

@testset "JET.jl" begin
JET.test_package(ADTypes, target_defined_modules = true)
end
66 changes: 39 additions & 27 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Pkg
using ADTypes
using ADTypes: AbstractADType,
mode,
Expand All @@ -17,14 +18,24 @@ using ADTypes: dense_ad,
column_coloring,
row_coloring,
symmetric_coloring
using Aqua: Aqua
using ChainRulesCore: ChainRulesCore, RuleConfig,
HasForwardsMode, HasReverseMode,
NoForwardsMode, NoReverseMode
using EnzymeCore: EnzymeCore
using JET: JET
using Test

const GROUP = get(ENV, "GROUP", "All")

function activate_qa_env()
Pkg.activate(joinpath(@__DIR__, "qa"))
# On Julia < 1.11 the [sources] section in the qa Project.toml is not honored,
# so Pkg.develop the package root path explicitly to test the PR branch code.
if VERSION < v"1.11.0-DEV.0"
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
end
return Pkg.instantiate()
end

## Backend-specific

struct CustomTag end
Expand Down Expand Up @@ -91,33 +102,34 @@ end

## Tests

@testset verbose = true "ADTypes.jl" begin
if VERSION >= v"1.10"
@testset "Aqua.jl" begin
Aqua.test_all(ADTypes; deps_compat = (check_extras = false,))
if GROUP == "All" || GROUP == "Core"
@testset verbose = true "ADTypes.jl" begin
@testset "Dense" begin
include("dense.jl")
end
@testset "JET.jl" begin
JET.test_package(ADTypes, target_defined_modules = true)
@testset "Sparse" begin
include("sparse.jl")
end
end
@testset "Dense" begin
include("dense.jl")
end
@testset "Sparse" begin
include("sparse.jl")
end
@testset "Symbols" begin
include("symbols.jl")
end
@testset "Legacy" begin
include("legacy.jl")
end
@testset "Miscellaneous" begin
include("misc.jl")
end
if VERSION >= v"1.11.0-DEV.469"
@testset "Public" begin
include("public.jl")
@testset "Symbols" begin
include("symbols.jl")
end
@testset "Legacy" begin
include("legacy.jl")
end
@testset "Miscellaneous" begin
include("misc.jl")
end
if VERSION >= v"1.11.0-DEV.469"
@testset "Public" begin
include("public.jl")
end
end
end
end

if GROUP == "QA"
activate_qa_env()
@testset "Quality Assurance" begin
include(joinpath(@__DIR__, "qa", "qa.jl"))
end
end
5 changes: 5 additions & 0 deletions test/test_groups.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Core]
versions = ["lts", "1", "pre"]

[QA]
versions = ["lts", "1"]
Loading