@@ -2,33 +2,44 @@ name: CompatHelper
22
33on :
44 schedule :
5- - cron : ' 0 0 * * *'
5+ - cron : 0 0 * * *
66 workflow_dispatch :
77
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
812jobs :
913 CompatHelper :
1014 runs-on : ubuntu-latest
1115 steps :
12- - uses : actions/checkout@v4
13- - name : Get Julia compatibility
14- id : julia_compat
15- # NOTE: this requires a Julia compat lower-bound with minor version!
16- run : |
17- version=$(grep '^julia = ' Project.toml | grep -o '".*"' | cut -d '"' -f2)
18- echo "::set-output name=version::$version"
19- - uses : julia-actions/setup-julia@v1
16+ - name : Check if Julia is already available in the PATH
17+ id : julia_in_path
18+ run : which julia
19+ continue-on-error : true
20+ - name : Install Julia, but only if it is not already available in the PATH
21+ uses : julia-actions/setup-julia@v1
2022 with :
21- version : ${{ steps.julia_compat.outputs.version }}
22- - name : Install CompatHelper
23+ version : ' 1'
24+ arch : ${{ runner.arch }}
25+ if : steps.julia_in_path.outcome != 'success'
26+ - name : " Add the General registry via Git"
27+ run : |
28+ import Pkg
29+ ENV["JULIA_PKG_SERVER"] = ""
30+ Pkg.Registry.add("General")
31+ shell : julia --color=yes {0}
32+ - name : " Install CompatHelper"
2333 run : |
2434 import Pkg
2535 name = "CompatHelper"
36+ uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
2637 version = "3"
27- Pkg.add(; name, version)
38+ Pkg.add(; name, uuid, version)
2839 shell : julia --color=yes {0}
29- - name : Run CompatHelper
40+ - name : " Run CompatHelper"
3041 run : |
31- using CompatHelper
42+ import CompatHelper
3243 CompatHelper.main()
3344 shell : julia --color=yes {0}
3445 env :
0 commit comments