Skip to content

Commit 4859375

Browse files
committed
Use Invoke-WebRequest instead of choco to install z3 on Windows
Because the `choco` installation of `z3` seems to be broken/outdated. Using `Invoke-WebRequest` instead of `choco` allows us to pin the version installed and to get a version which includes the `z3.exe`, not just `z3.dll`. Using `nuget` was also considered, so that we were still using a package manager. But the up to date `nuget` package was missing the `.exe` file. `wget` is supposed to be aliased to `Invoke-WebRequest` in powershell. However `Invoke-WebRequest` is used rather than `wget` as `wget` does not seem to work for windows github actions jobs.
1 parent 4dd0c1d commit 4859375

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/pull-request-checks.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,12 @@ jobs:
248248
submodules: recursive
249249
- name: Fetch dependencies
250250
run: |
251-
choco install winflexbison3 z3
251+
choco install winflexbison3
252252
nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0
253253
echo "c:\tools\clcache\clcache-4.1.0" >> $env:GITHUB_PATH
254+
Invoke-WebRequest -Uri https://github.com/Z3Prover/z3/releases/download/z3-4.8.10/z3-4.8.10-x64-win.zip -OutFile .\z3.zip
255+
Expand-Archive -LiteralPath '.\z3.Zip' -DestinationPath C:\tools
256+
echo "c:\tools\z3-4.8.10-x64-win\bin;" >> $env:GITHUB_PATH
254257
- name: Setup Visual Studio environment
255258
uses: microsoft/[email protected]
256259
- name: Prepare ccache
@@ -287,11 +290,14 @@ jobs:
287290
submodules: recursive
288291
- name: Fetch dependencies
289292
run: |
290-
choco install winflexbison3 strawberryperl z3
293+
choco install winflexbison3 strawberryperl
291294
nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0
292295
echo "c:\tools\clcache\clcache-4.1.0" >> $env:GITHUB_PATH
293296
echo "c:\ProgramData\chocolatey\bin" >> $env:GITHUB_PATH
294297
echo "c:\Strawberry\" >> $env:GITHUB_PATH
298+
Invoke-WebRequest -Uri https://github.com/Z3Prover/z3/releases/download/z3-4.8.10/z3-4.8.10-x64-win.zip -OutFile .\z3.zip
299+
Expand-Archive -LiteralPath '.\z3.Zip' -DestinationPath C:\tools
300+
echo "c:\tools\z3-4.8.10-x64-win\bin;" >> $env:GITHUB_PATH
295301
- name: Setup MSBuild
296302
uses: microsoft/[email protected]
297303
- name: Initialise Developer Command Line

0 commit comments

Comments
 (0)