File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- if (Test-Path - Path $env: LIBGIT2_SRC ) {
2- Set-Location $env: LIBGIT2_SRC
1+ if (! (Test-Path - Path " build" )) {
2+ # in case the pygit2 package build/ workspace has not been created by cibuildwheel yet
3+ mkdir build
4+ }
5+ if (Test-Path - Path " $env: LIBGIT2_SRC " ) {
6+ Set-Location " $env: LIBGIT2_SRC "
7+ # for local runs, reuse build/libgit_src if it exists
38 if (Test-Path - Path build) {
9+ # purge previous build env (likely for a different arch type)
410 Remove-Item - Recurse - Force build
511 }
12+ # ensure we are checked out to the right version
613 git fetch -- depth= 1 -- tags
7- git checkout v$env: LIBGIT2_VERSION
14+ git checkout " v$env: LIBGIT2_VERSION "
815} else {
9- git clone -- depth= 1 - b v$env: LIBGIT2_VERSION https:// github.com / libgit2/ libgit2.git $env: LIBGIT2_SRC
10- Set-Location $env: LIBGIT2_SRC
16+ # from a fresh run (like in CI)
17+ git clone -- depth= 1 - b " v$env: LIBGIT2_VERSION " https:// github.com / libgit2/ libgit2.git $env: LIBGIT2_SRC
18+ Set-Location " $env: LIBGIT2_SRC "
1119}
1220cmake - B build - S . - DBUILD_TESTS= OFF
1321cmake -- build build/ -- config= Release -- target install
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ repair-wheel-command = "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/li
2626
2727[tool .cibuildwheel .windows ]
2828environment.LIBGIT2_SRC = " build/libgit2_src"
29+ environment.LIBGIT2_VERSION = " 1.9.1"
2930before-all = " powershell -File build.ps1"
3031
3132[[tool .cibuildwheel .overrides ]]
You can’t perform that action at this time.
0 commit comments