diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d902ae6e6d..899ba54b81 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -3,8 +3,9 @@ on: [push, pull_request] jobs: msys2-ucrt64: - if: false # build is broken, thus disabled, see #8264 + if: true # can be used to temporarily disable the build runs-on: windows-latest + timeout-minutes: 90 defaults: run: shell: msys2 {0} @@ -18,11 +19,20 @@ jobs: update: true - name: Install dependencies run: ./scripts/msys2-install-deps + - name: Build python venv + run: | + # msys2's python is externally managed (PEP 668), so pip-installed packages go into a venv. + # --system-site-packages: use the python packages installed via pacman. + python -m venv --system-site-packages env + . env/bin/activate + pip install pyinstaller==6.22.3 - name: Build - run: ./scripts/msys2-build + run: | + . env/bin/activate + ./scripts/msys2-build - name: Test run: ./dist/borg.exe -V - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: borg-windows path: dist/borg.exe diff --git a/scripts/msys2-build b/scripts/msys2-build index 377d879a3d..00bfa578cd 100644 --- a/scripts/msys2-build +++ b/scripts/msys2-build @@ -1,8 +1,8 @@ #!/bin/bash # build borg.exe -SETUPTOOLS_USE_DISTUTILS=stdlib pip install -e . +pip install -e . pyinstaller -y scripts/borg.exe.spec # build sdist and wheel in dist/... -SETUPTOOLS_USE_DISTUTILS=stdlib python -m build +python -m build diff --git a/scripts/msys2-install-deps b/scripts/msys2-install-deps index 9c28f0ea95..7e265d67bc 100644 --- a/scripts/msys2-install-deps +++ b/scripts/msys2-install-deps @@ -1,4 +1,3 @@ #!/bin/bash pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python,cython,python-setuptools,python-wheel,python-build,python-pkgconfig,python-packaging,python-msgpack,python-pip} -pip install pyinstaller==6.3.0