Skip to content

Commit 83cea52

Browse files
committed
Enable x86 in basemap-for-windows workflow
1 parent c5d2712 commit 83cea52

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

.github/workflows/basemap-for-windows.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ jobs:
1515
arch:
1616
[
1717
"x64",
18+
"x86",
1819
]
19-
max-parallel: 1
20+
max-parallel: 2
2021
fail-fast: false
2122
runs-on: windows-latest
2223
steps:
@@ -30,15 +31,15 @@ jobs:
3031
python-version: "3.6"
3132
architecture: ${{ matrix.arch }}
3233
-
33-
name: Install CMake
34-
uses: jwlawson/[email protected]
35-
with:
36-
cmake-version: "3.16.x"
37-
-
38-
name: Install MSVC toolchain
34+
name: Set MSVC toolchain
3935
uses: ilammy/msvc-dev-cmd@v1
4036
with:
4137
arch: ${{ matrix.arch }}
38+
-
39+
name: Install CMake
40+
uses: jwlawson/[email protected]
41+
with:
42+
cmake-version: "3.13.x"
4243
-
4344
name: Build GEOS from source
4445
run: |
@@ -57,6 +58,7 @@ jobs:
5758
arch:
5859
[
5960
"x64",
61+
"x86",
6062
]
6163
python-version:
6264
[
@@ -66,7 +68,7 @@ jobs:
6668
"3.8",
6769
"3.9",
6870
]
69-
max-parallel: 6
71+
max-parallel: 5
7072
fail-fast: false
7173
needs: build-geos
7274
runs-on: windows-latest
@@ -81,28 +83,22 @@ jobs:
8183
python-version: "${{ matrix.python-version }}"
8284
architecture: ${{ matrix.arch }}
8385
-
84-
name: Download GEOS artifacts
85-
uses: actions/download-artifact@v1
86-
with:
87-
name: artifacts-geos-${{ matrix.arch }}
88-
path: ${{ env.PKGDIR }}/extern
89-
-
90-
name: Define MSVC toolchain version
86+
name: Set MSVC toolset
9187
run: |
9288
if ("${{ matrix.python-version }}" -lt "3.3") {
93-
Set-Variable -Name "vcversion" -Value "9.0"
89+
Set-Variable -Name "msvc_toolset" -Value "9.0"
9490
} elseif ("${{ matrix.python-version }}" -lt "3.5") {
95-
Set-Variable -Name "vcversion" -Value "10.0"
91+
Set-Variable -Name "msvc_toolset" -Value "10.0"
9692
} else {
97-
Set-Variable -Name "vcversion" -Value "16"
93+
Set-Variable -Name "msvc_toolset" -Value "16"
9894
}
99-
echo "VCVERSION=${vcversion}" >> $env:GITHUB_ENV
95+
echo "MSVC_TOOLSET=${msvc_toolset}" >> $env:GITHUB_ENV
10096
-
101-
name: Install MSVC toolchain
97+
name: Set MSVC toolchain
10298
uses: ilammy/msvc-dev-cmd@v1
10399
with:
104100
arch: ${{ matrix.arch }}
105-
toolset: ${{ env.VCVERSION }}
101+
toolset: ${{ env.MSVC_TOOLSET }}
106102
-
107103
name: Install Python base packages
108104
run: |
@@ -127,6 +123,12 @@ jobs:
127123
cd ..
128124
cp -R "${pkgcode}/${includedir}/numpy" "${{ env.PKGDIR }}/extern/include/numpy"
129125
rm -r "${pkgcode}"
126+
-
127+
name: Download GEOS artifacts
128+
uses: actions/download-artifact@v1
129+
with:
130+
name: artifacts-geos-${{ matrix.arch }}
131+
path: ${{ env.PKGDIR }}/extern
130132
-
131133
name: Build wheel
132134
run: |
@@ -148,6 +150,7 @@ jobs:
148150
arch:
149151
[
150152
"x64",
153+
"x86",
151154
]
152155
python-version:
153156
[

packages/basemap/utils/GeosLibrary.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,7 @@ def build(self, installdir=None, njobs=1):
159159
"-DCMAKE_INSTALL_PREFIX={0}".format(installdir),
160160
"-DGEOS_ENABLE_TESTS=OFF",
161161
]
162-
if os.name == "nt":
163-
config_opts.append("-DCMAKE_GENERATOR_PLATFORM=x64")
164-
config_opts.append("-DCMAKE_GENERATOR_TOOLSET=host=x64")
165-
else:
162+
if os.name != "nt":
166163
config_opts.append("-DCMAKE_BUILD_TYPE=Release")
167164

168165
# Define build options.

0 commit comments

Comments
 (0)