Skip to content
Closed
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
44 changes: 44 additions & 0 deletions .github/workflows/jet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: JET

on:
push:
branches: [master]
tags: ["*"]
pull_request:

jobs:
jet:
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- 'min'
- 'lts'
- '1'
# Latest JET support version
# https://github.com/aviatesk/JET.jl/blob/master/Project.toml
- '1.12'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- name: Install JET
shell: julia --project --color=yes {0}
run: |
using Pkg
Pkg.add("JET")
- name: Run JET
shell: julia --project --color=yes {0}
run: |
using JET, Test
using SpecialFunctions
include("test/jet.jl")
Comment on lines +34 to +44
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That breaks the current workflow of running JET tests locally.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it seems there's only one way:
Set up separate CI for the Julia version not supported by JET (pre for now).
Manually remove JET and then test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ChainRulesCore = "0.9.44, 0.10, 1"
ChainRulesTestUtils = "0.6.8, 0.7, 1"
ExplicitImports = "1.13.2"
IrrationalConstants = "0.1, 0.2"
JET = "0.9, 0.10"

LogExpFunctions = "0.3.2"
OpenLibm_jll = "0.7, 0.8"
OpenSpecFun_jll = "0.5"
Expand All @@ -34,9 +34,9 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"

Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "ChainRulesCore", "ChainRulesTestUtils", "ExplicitImports", "JET", "Random", "Test"]
test = ["Aqua", "ChainRulesCore", "ChainRulesTestUtils", "ExplicitImports", "Random", "Test"]
17 changes: 17 additions & 0 deletions test/jet.jl
Original file line number Diff line number Diff line change
@@ -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
8 changes: 0 additions & 8 deletions test/logabsgamma.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 0 additions & 8 deletions test/qa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ using Base.MathConstants: γ

using Aqua: Aqua
using ExplicitImports: ExplicitImports
using JET: JET

using SpecialFunctions: AmosException, f64

Expand Down
Loading