Skip to content

Commit

Permalink
Small fixes (#387)
Browse files Browse the repository at this point in the history
- fix package resolution on CI
- test `'pre'` not `'nightly'`
- fix a mac-specific test failure
- small optimization in `flatten`
  • Loading branch information
timholy authored Jul 5, 2024
1 parent 2f402a9 commit a82644a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defaults:
run:
shell: bash

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

Expand All @@ -26,7 +26,7 @@ jobs:
version: '1'
- run: julia --project -e 'using Pkg; Pkg.develop([PackageSpec(path=joinpath(pwd(), "SnoopCompileCore"))])'
- uses: julia-actions/julia-buildpkg@latest
- run: julia --project=docs/ -e 'using Pkg; Pkg.develop([PackageSpec(path=joinpath(pwd(), "SnoopCompileCore"))]); Pkg.instantiate()'
- run: julia --project=docs/ -e 'using Pkg; Pkg.develop([PackageSpec(path=joinpath(pwd(), "SnoopCompileCore")), PackageSpec(path=joinpath(pwd()))]); Pkg.instantiate()'
- uses: julia-actions/julia-docdeploy@releases/v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
version:
- '1.10'
- '1'
- 'nightly'
- 'pre'
os:
- ubuntu-latest
- macOS-latest
Expand All @@ -31,7 +31,7 @@ jobs:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
Expand Down
2 changes: 1 addition & 1 deletion src/parcel_snoop_inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ See also: [`accumulate_by_source`](@ref).
function flatten(tinf::InferenceTimingNode; tmin = 0.0, sortby::Union{typeof(exclusive),typeof(inclusive),Nothing}=exclusive)
out = InferenceTiming[]
flatten!(sortby === nothing ? exclusive : sortby, out, tinf, tmin)
return sortby===nothing ? out : sort(out; by=sortby)
return sortby===nothing ? out : sort!(out; by=sortby)
end

function flatten!(gettime::Union{typeof(exclusive),typeof(inclusive)}, out, node, tmin)
Expand Down
2 changes: 1 addition & 1 deletion test/snoop_inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ hasconstpropnumber(mi_info::Core.Compiler.Timings.InferenceFrameInfo) = any(t ->
@test all(node -> Method(node) == mg, tinfsg)

longest_frame_time = exclusive(frames[end])
@test length(flatten(tinf, tmin=longest_frame_time)) == 1
@test length(filter(!hasconstpropnumber, flatten(tinf, tmin=longest_frame_time))) == 1

frames_unsorted = filter(!hasconstpropnumber, flatten(tinf; sortby=nothing))
ifi = frames_unsorted[1].mi_info
Expand Down

0 comments on commit a82644a

Please sign in to comment.