diff --git a/action.yml b/action.yml index 60789a3..a6da0a2 100644 --- a/action.yml +++ b/action.yml @@ -23,13 +23,13 @@ runs: run: | REPONAME="${{ github.event.repository.name }}" PACKAGENAME=${REPONAME%.jl} - echo "::set-output name=packagename::$PACKAGENAME" + echo "packagename=$PACKAGENAME" >> $GITHUB_OUTPUT if [[ '${{ inputs.test_script }}' == '' ]]; then TESTSCRIPT="using ${PACKAGENAME}" else TESTSCRIPT=${{ inputs.test_script }} fi - echo "::set-output name=testscript::$TESTSCRIPT" + echo "testscript=$TESTSCRIPT" >> $GITHUB_OUTPUT shell: bash - name: Install SnoopCompile tools @@ -37,5 +37,20 @@ runs: shell: bash - name: Load package on branch id: invs - 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)")' - shell: bash + run: | + 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 + + # Set outputs + open(ENV["GITHUB_OUTPUT"], "a") do io + println(io, "total=$(inv_total)") + println(io, "deps=$(inv_deps)")' + end + shell: julia --color=yes --project=. {0}