-
Notifications
You must be signed in to change notification settings - Fork 15
145 lines (125 loc) · 4.54 KB
/
win-wheels.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
---
name: Windows wheels
on: [push, pull_request, workflow_dispatch]
env:
REF: 1.4a2
# cancel running jobs on new commit to PR
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-wheels-win:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: "windows-2019"
arch: AMD64
msvc_arch: x64
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache vcpkg
uses: actions/cache@v3
id: vcpkgcache
with:
path: "$VCPKG_INSTALLATION_ROOT/installed"
key: ${{ runner.os }}-vcpkg-${{ hashFiles('.github/workflows/*', 'vcpkg.json') }}-1
- name: Bootstrap vcpkg
env:
VCPKG_DEFAULT_TRIPLET: x64-windows
run: |
cd "$VCPKG_INSTALLATION_ROOT"
git pull > nul
./bootstrap-vcpkg.bat -disableMetrics
shell: bash
- name: Install C Packages (GDAL et al)
env:
VCPKG_DEFAULT_TRIPLET: x64-windows
run: |
vcpkg install --feature-flags="versions,manifests" --x-manifest-root=${GITHUB_WORKSPACE} --x-install-root=$VCPKG_INSTALLATION_ROOT/installed
shell: bash
- name: Upload vcpkg build logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
path: "C:/vcpkg/buildtrees/**/*.log"
- name: Checkout
uses: actions/checkout@v3
with:
repository: Toblerity/Fiona
fetch-depth: 0
ref: ${{ env.REF }}
- name: Add to setup.cfg
run: |
echo -e "\n[build_ext]" >> setup.cfg
echo "include_dirs = C:/vcpkg/installed/x64-windows/include" >> setup.cfg
echo "libraries = gdal" >> setup.cfg
echo "library_dirs = C:/vcpkg/installed/x64-windows/lib" >> setup.cfg
cat setup.cfg
shell: bash
- name: vcpkg debugging
run: |
find $VCPKG_INSTALLATION_ROOT -name gdal.lib
find $VCPKG_INSTALLATION_ROOT -name header.dxf
shell: bash
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: "*-win32 pp*"
CIBW_ENVIRONMENT_WINDOWS:
VCPKG_INSTALL="C:/vcpkg/installed/x64-windows"
GDAL_INCLUDE_PATH="$VCPKG_INSTALL/include"
GDAL_LIBRARY_PATH="$VCPKG_INSTALL/lib"
PACKAGE_DATA=1
GDAL_DATA="$VCPKG_INSTALL/share/gdal"
PROJ_DATA="$VCPKG_INSTALL/share/proj"
GDAL_VERSION="3.8.3"
CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin -w {dest_dir} {wheel}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
test-wheels:
name: Test wheels on ${{ matrix.os }} (Python ${{ matrix.python-version }})
needs: [build-wheels-win]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Checkout Rasterio
uses: actions/checkout@v3
with:
repository: Toblerity/Fiona
ref: ${{ env.REF }}
path: ./Fiona
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Download wheels from artifacts
uses: actions/download-artifact@v2
with:
path: wheelhouse
- name: Install dependencies and Fiona wheel
shell: bash
run: |
python -m pip install attrs pytest click mock boto3 packaging hypothesis pytz fsspec aiohttp requests pyparsing shapely
python -m pip install --pre --no-deps --find-links wheelhouse/artifact fiona
python -m pip install fiona
python -m pip list
- name: Run tests
shell: bash
run: |
fio --version
fio env --formats
python test_fiona_issue383.py
cp -R Fiona/tests tests
GDAL_ENABLE_DEPRECATED_DRIVER_GTM=YES PROJ_NETWORK=ON python -m pytest -vv tests -m "not gdalbin" -k "not test_collection_zip_http and not test_mask_polygon_triangle and not test_show_versions and not test_append_or_driver_error and not [PCIDSK] and not cannot_append[FlatGeobuf] and not proj_data_environ"