-
-
Notifications
You must be signed in to change notification settings - Fork 74
Add JET tests #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add JET tests #506
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8e5bc0b
add JET tests
JoshuaLampert 6f7940d
fix some of the issues found by JET.jl
JoshuaLampert 8c6695e
Merge branch 'master' into JET-tests
JoshuaLampert ee313ba
format
JoshuaLampert 5a615f3
filter errors related to similar_type
JoshuaLampert 2acf709
more JET tests to test group
JoshuaLampert c2d9a81
use test setup
JoshuaLampert 6ee2843
don't add JET
JoshuaLampert 4828dc7
add using statements
JoshuaLampert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: JET | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| tags: ['*'] | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| # Skip intermediate builds: always. | ||
| # Cancel intermediate builds: only if it is a pull request build. | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
|
|
||
| jobs: | ||
| test: | ||
| if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
| name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: | ||
| - '1.12' | ||
| os: | ||
| - ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: julia-actions/setup-julia@v2 | ||
| with: | ||
| version: ${{ matrix.version }} | ||
| - run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)' | ||
| - uses: julia-actions/cache@v2 | ||
| - name: Install and run JET.jl | ||
| shell: julia --project="." --color=yes {0} | ||
| run: | | ||
| using Pkg | ||
| Pkg.add("JET") | ||
| Pkg.instantiate() | ||
| using JET | ||
| using RecursiveArrayTools | ||
|
|
||
| # Get all reports first | ||
| result = JET.report_package(RecursiveArrayTools; target_modules = (RecursiveArrayTools,)) | ||
| reports = JET.get_reports(result) | ||
|
|
||
| # Filter out similar_type inference errors from StaticArraysCore | ||
| filtered_reports = filter(reports) do report | ||
| s = string(report) | ||
| !(occursin("similar_type", s) && occursin("StaticArraysCore", s)) | ||
| end | ||
|
|
||
| # Check if there are any non-filtered errors | ||
| if !isempty(filtered_reports) | ||
| @error "JET found errors" filtered_reports | ||
| exit(1) | ||
| else | ||
| @info "All JET errors are filtered (similar_type related)" | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of a new workflow it should just be a new test group
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That won't be possible because we cannot add JET.jl to the Project.toml and test on julia pre-v1.12 and v1.12 due to package compat connstraints, see NumericalMathematics/DispersiveShallowWater.jl#216 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it just needs to allow JET v0.9 and v0.11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean something like 2acf709? Let's see if that works. Last time I tried to make something like this work, I always got compat problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, seems fine.