Skip to content

Commit 843a2f3

Browse files
authored
Replace deprecated set-output and use Julia shell (#6)
1 parent 435283c commit 843a2f3

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

action.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,34 @@ runs:
2323
run: |
2424
REPONAME="${{ github.event.repository.name }}"
2525
PACKAGENAME=${REPONAME%.jl}
26-
echo "::set-output name=packagename::$PACKAGENAME"
26+
echo "packagename=$PACKAGENAME" >> $GITHUB_OUTPUT
2727
if [[ '${{ inputs.test_script }}' == '' ]]; then
2828
TESTSCRIPT="using ${PACKAGENAME}"
2929
else
3030
TESTSCRIPT=${{ inputs.test_script }}
3131
fi
32-
echo "::set-output name=testscript::$TESTSCRIPT"
32+
echo "testscript=$TESTSCRIPT" >> $GITHUB_OUTPUT
3333
shell: bash
3434

3535
- name: Install SnoopCompile tools
3636
run: julia --project -e 'using Pkg; Pkg.add(["SnoopCompileCore", "SnoopCompile"])'
3737
shell: bash
3838
- name: Load package on branch
3939
id: invs
40-
run: julia --project -e 'using SnoopCompileCore; invalidations = @snoopr begin ${{ steps.info.outputs.testscript }} end; using SnoopCompile; inv_owned = length(filtermod(${{ steps.info.outputs.packagename }}, invalidation_trees(invalidations))); inv_total = length(uinvalidated(invalidations)); inv_deps = inv_total - inv_owned; @show inv_total, inv_deps; println("::set-output name=total::$(inv_total)"); println("::set-output name=deps::$(inv_deps)")'
41-
shell: bash
40+
run: |
41+
using SnoopCompileCore
42+
invalidations = @snoopr begin ${{ steps.info.outputs.testscript }} end
43+
44+
using SnoopCompile
45+
inv_owned = length(filtermod(${{ steps.info.outputs.packagename }}, invalidation_trees(invalidations)))
46+
inv_total = length(uinvalidated(invalidations))
47+
inv_deps = inv_total - inv_owned
48+
49+
@show inv_total, inv_deps
50+
51+
# Set outputs
52+
open(ENV["GITHUB_OUTPUT"], "a") do io
53+
println(io, "total=$(inv_total)")
54+
println(io, "deps=$(inv_deps)")'
55+
end
56+
shell: julia --color=yes --project=. {0}

0 commit comments

Comments
 (0)