File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -18,28 +18,39 @@ jobs:
18
18
- name : Checkout tree
19
19
uses : actions/checkout@v4
20
20
21
+ - name : Download install.ps1
22
+ run : |
23
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
24
+ (New-Object System.Net.WebClient).DownloadFile("https://raw.githubusercontent.com/ocaml/opam/master/shell/install.ps1", ".\install.ps1")
25
+
21
26
- name : Restore opam cache
22
27
id : cache-opam
23
28
uses : actions/cache/restore@v4
24
29
with :
25
30
path : |
26
31
D:\opam\bin
27
32
D:\opamroot
28
- key : ${{ runner.os }}-opam
33
+ key : ${{ runner.os }}-opam-${{ hashFiles('install.ps1') }}
29
34
30
35
- name : Install opam
31
36
if : steps.cache-opam.outputs.cache-hit != 'true'
32
37
run : |
33
- Invoke-Expression "& { $(Invoke-RestMethod https://raw.githubusercontent.com/kit-ty-kate/opam/windows-installer.debug/shell/ install.ps1) } -OpamBinDir 'D:\opam\bin' -NoSetPath -NoAdmin "
38
+ Invoke-Expression "& ./ install.ps1 -OpamBinDir 'D:\opam\bin'"
34
39
35
40
- name : Add opam to PATH
36
41
run : |
42
+ D:\opam\bin\opam --version
37
43
"D:\opam\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
38
44
39
45
- name : Init opam
40
46
if : steps.cache-opam.outputs.cache-hit != 'true'
41
47
run : opam init --yes --no-setup .
42
48
49
+ - name : Restrict testing to available compilers
50
+ if : steps.cache-opam.outputs.cache-hit != 'true'
51
+ # TODO Amend this lowerbound as older compiler packages are updated
52
+ run : opam switch set-invariant --formula "`"ocaml`" {>= `"4.13`"}"
53
+
43
54
- name : Save opam cache
44
55
if : steps.cache-opam.outputs.cache-hit != 'true'
45
56
uses : actions/cache/save@v4
You can’t perform that action at this time.
0 commit comments