Add new Windows build scripts and CI with GitHub and MSYS2

Fixes #7097
This commit is contained in:
Rayyan Ansari 2022-10-27 13:35:12 +01:00
parent 83980e304e
commit 2b98a423ed
No known key found for this signature in database
GPG Key ID: 46A8D18E5BC49D84
3 changed files with 36 additions and 0 deletions

27
.github/workflows/windows.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Windows CI
on: [push, pull_request]
jobs:
msys2-ucrt64:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
- name: Install dependencies
run: ./scripts/msys2-install-deps
- name: Build
run: ./scripts/msys2-build
- name: Test
run: ./dist/borg.exe -V
- uses: actions/upload-artifact@v3
with:
name: borg-windows
path: dist/borg.exe

5
scripts/msys2-build Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
python setup.py build_ext --inplace
python setup.py bdist_wheel
pyinstaller -y scripts/borg.exe.spec

View File

@ -0,0 +1,4 @@
#!/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-pkgconfig,python-packaging,python-msgpack,python-argon2_cffi,python-pip}
pip install pyinstaller