diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0393375..cc2e3484 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,15 @@ jobs: with: version: ${{ matrix.version }} - uses: julia-actions/cache@v2 + - name: Remove JET + # Update this condition when JET support new version + if: matrix.version == 'pre' + # JuliaLang/Pkg.jl#3741: using Pkg; Pkg.rm("JET") + shell: bash + run: | + sed -i.bak '/^JET = "/d' Project.toml + sed -i.bak 's/"JET", //g' Project.toml + rm Project.toml.bak - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 diff --git a/test/jet.jl b/test/jet.jl new file mode 100644 index 00000000..64ab6f0b --- /dev/null +++ b/test/jet.jl @@ -0,0 +1,17 @@ +using JET: JET + +@testset "package" begin + # Check that there are no undefined global references and undefined field accesses + JET.test_package(SpecialFunctions; target_defined_modules = true, mode = :typo) + + # Analyze methods based on their declared signature + JET.report_package(SpecialFunctions; target_defined_modules = true) +end + +@testset "logabsgamma" begin + # issue #502 + JET.@test_call logabsgamma(1.0) + JET.@test_opt logabsgamma(1.0) + JET.@test_call logabsgamma(1f0) + JET.@test_opt logabsgamma(1f0) +end diff --git a/test/logabsgamma.jl b/test/logabsgamma.jl index c6ac837f..344b890b 100644 --- a/test/logabsgamma.jl +++ b/test/logabsgamma.jl @@ -156,11 +156,3 @@ x = 8.000001f0 # (i.e. prevfloat(8.000001f0) == 8.0f0) # We still check appropriate behavior at 8.0f0 @test ulp(8.0f0) < 0.4006594736129046 - -@testset "JET" begin - # issue #502 - JET.@test_call logabsgamma(1.0) - JET.@test_opt logabsgamma(1.0) - JET.@test_call logabsgamma(1f0) - JET.@test_opt logabsgamma(1f0) -end diff --git a/test/qa.jl b/test/qa.jl index e2d34159..7fbe2277 100644 --- a/test/qa.jl +++ b/test/qa.jl @@ -53,11 +53,3 @@ end # No self-qualified accesses @test ExplicitImports.check_no_self_qualified_accesses(SpecialFunctions) === nothing end - -@testset "JET" begin - # Check that there are no undefined global references and undefined field accesses - JET.test_package(SpecialFunctions; target_defined_modules = true, mode = :typo) - - # Analyze methods based on their declared signature - JET.report_package(SpecialFunctions; target_defined_modules = true) -end diff --git a/test/runtests.jl b/test/runtests.jl index 87b51d4c..ff9bc243 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -9,7 +9,6 @@ using Base.MathConstants: γ using Aqua: Aqua using ExplicitImports: ExplicitImports -using JET: JET using SpecialFunctions: AmosException, f64 @@ -50,3 +49,11 @@ for t in tests include(tp) end end + +# Update this condition when JET support new version +# https://github.com/aviatesk/JET.jl/blob/master/Project.toml +if VERSION < v"1.13" + @testset "JET" begin + include(joinpath(testdir, "jet.jl")) + end +end