Skip to content
This repository was archived by the owner on Feb 24, 2024. It is now read-only.

Commit bc797d9

Browse files
committed
Separate win32/64 builds
1 parent 7b038d8 commit bc797d9

File tree

3 files changed

+44
-30
lines changed

3 files changed

+44
-30
lines changed

.github/workflows/build.yaml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,48 @@ jobs:
2727
- name: Checkout sources
2828
uses: actions/checkout@v3
2929

30-
- name: Prepare Windows builds
30+
- name: Prepare Windows x86 builds
3131
uses: ilammy/msvc-dev-cmd@v1
3232
with:
3333
toolset: "14.0"
34-
arch: ${{ matrix.arch }}
34+
arch: "x86"
3535

36-
- name: Build wheels
36+
- name: Build Windows x86 wheels
3737
uses: pypa/cibuildwheel@v2.8.1
3838
env:
39+
CIBW_BUILD: "*win32"
40+
CIBW_BEFORE_BUILD_WINDOWS: "call xmlstarlet\\setup_msvc.bat"
41+
CIBW_ENVIRONMENT_WINDOWS: >
42+
PLATFORM_NAME=x86
43+
DISTUTILS_USE_SDK=1
44+
MSSdk=1
45+
with:
46+
package-dir: .
47+
output-dir: wheelhouse
48+
49+
- name: Prepare Windows x64 builds
50+
uses: ilammy/msvc-dev-cmd@v1
51+
with:
52+
toolset: "14.0"
53+
arch: "x64"
54+
55+
- name: Build Windows x86 wheels
56+
uses: pypa/cibuildwheel@v2.8.1
57+
env:
58+
CIBW_BUILD: "*win_amd64"
59+
CIBW_BEFORE_BUILD_WINDOWS: "call xmlstarlet\\setup_msvc.bat"
60+
CIBW_ENVIRONMENT_WINDOWS: >
61+
PLATFORM_NAME=amd64
62+
DISTUTILS_USE_SDK=1
63+
MSSdk=1
64+
with:
65+
package-dir: .
66+
output-dir: wheelhouse
67+
68+
- name: Build Linux and MacOS wheels
69+
uses: pypa/cibuildwheel@v2.8.1
70+
env:
71+
CIBW_SKIP: "*win*"
3972
CIBW_BEFORE_ALL_LINUX: >
4073
yum install -y libxslt-devel ||
4174
apt-get -y install libxslt1-dev libxml2-dev ||
@@ -45,18 +78,12 @@ jobs:
4578
brew cleanup -s libxml2 libxslt libffi &&
4679
brew cleanup --prune-prefix &&
4780
brew install libxml2 libxslt automake pkg-config
48-
CIBW_BEFORE_ALL_WINDOWS: "call xmlstarlet\\setup_msvc.bat"
49-
CIBW_BEFORE_BUILD_WINDOWS: "call xmlstarlet\\build_msvc.bat"
5081
CIBW_ENVIRONMENT_MACOS: >
5182
ARCHFLAGS="-arch x86_64"
5283
PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/libxslt/lib/pkgconfig"
5384
LDFLAGS="-L/usr/local/opt/libxml2/lib -L/usr/local/opt/libxslt/lib"
5485
CPPFLAGS="-I/usr/local/opt/libxml2/include -I/usr/local/opt/libxslt/include -I/usr/local/opt/libffi/include"
5586
PATH="/usr/local/opt/libxslt/bin:/usr/local/opt/libxml2/bin:$PATH"
56-
CIBW_ENVIRONMENT_WINDOWS: >
57-
CIBW_BUILD="*win32 *win_amd64"
58-
DISTUTILS_USE_SDK=1
59-
MSSdk=1
6087
with:
6188
package-dir: .
6289
output-dir: wheelhouse

xmlstarlet/build_msvc.bat

Lines changed: 0 additions & 14 deletions
This file was deleted.

xmlstarlet/setup_msvc.bat

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,13 @@ set XSLT_URL=https://download.gnome.org/sources/libxslt/1.1/
77
set XML2_TARBALL=libxml2-2.9.1.tar.xz
88
set XSLT_TARBALL=libxslt-1.1.28.tar.xz
99

10-
echo ENVIRONMENT
11-
echo %Platform%
12-
set
13-
1410
set PREFIX=C:\opt
1511

1612
if exist %PREFIX% rd /q /s %PREFIX%
1713

1814
if exist _build rd /q /s _build
1915
md _build
2016

21-
if exist "C:\Program Files\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" call "C:\Program Files\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
22-
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
23-
2417
rem Kill Git's link.exe which shadows MSVC's link.exe
2518
if exist "C:\Program Files\Git\usr\bin\link.exe" del "C:\Program Files\Git\usr\bin\link.exe"
2619
if exist "C:\Program Files (x86)\Git\usr\bin\link.exe" del "C:\Program Files (x86)\Git\usr\bin\link.exe"
@@ -70,3 +63,11 @@ del Makefile.patch
7063
nmake all
7164
nmake install
7265
cd ..\..\..
66+
67+
echo Building xmlstarlet...
68+
cd xmlstarlet\win32\
69+
70+
cscript configure.js include=%PREFIX%\include\libxml2 prefix=%PREFIX% static=yes debug=no arch=%PLATFORM_NAME%
71+
nmake all
72+
nmake install
73+
cd ..\..

0 commit comments

Comments
 (0)