Skip to content

Commit

Permalink
Test build of 34c0dd5 (#90)
Browse files Browse the repository at this point in the history
* Test build of 34c0dd5

That's the no _loading rasterio PR rasterio/rasterio#2594.

* Set fetch depth

* Use branch name

* Update vcpkg.json

* Add vcpkg.json to hash key

* Update vcpkg.json

* Update win-wheels.yaml

* Add a baseline

* Add versions feature flag

* Build maint-1.3

* Update win-wheels.yaml

* Fix PROJ_LIB directory for PROJ 9.1+

* Try manifest feature flag and check against fiona

* vcpkg'ing before the checkout action

* Add debugging

* Use bash shell

* change directory before running vcpkg

* checkout step

* Remove baseline

* Add vcpkg as submodule

* Install vcpkg using cmd

* Get submodules

* Bootstrap vcpkg as separate step

* Remove platform tags from manifest

* Try adding a baseline and using builtin vcpkg

* Back to submodule vcpkg

* Use gitsha of vcpkg 2022.09.27

* Use vcpkg 2022.09.27

* GDAL 3.5.2 isn't available in a vcpkg release yet

* Override VCPKG_INSTALLATION_ROOT set by GHA

* Try GDAL 3.5.2 again

* One more override try

* Use default (powershell) more often

* Come on!

* Bootstrap from builtin vcpkg like pyproj does

* Run step with bash

* Suss out install directory changes

* Specify install root

* Try to find GDAL after installation

* add x-install-root

* Remove commands destined to fail

* Moar debugging

* manifests with an s

* Set manifest root, grasping at straws

* Use capital C in drive path

* Remove vcpkg from gitmodules

* Search for GDAL_DATA directory

* Add VCPKG_DEFAULT_TRIPLET

* fix PROJ_:LIB for PROJ 9.0.1

* Skip 2 tests on Windows

* Remove submodule directory

Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
  • Loading branch information
sgillies and snowman2 committed Oct 11, 2022
1 parent 5566347 commit 0eed1dd
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 32 deletions.
79 changes: 48 additions & 31 deletions .github/workflows/win-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Windows wheels
on: [push, pull_request, workflow_dispatch]

env:
REF: 1.3.2
REF: maint-1.3

# cancel running jobs on new commit to PR
concurrency:
Expand All @@ -22,63 +22,74 @@ jobs:
- os: "windows-2019"
arch: AMD64
msvc_arch: x64
# windows requires windows-specific paths
vcpkg_cache: "c:\\vcpkg\\installed"
vcpkg_logs: "c:\\vcpkg\\buildtrees\\**\\*.log"

steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: rasterio/rasterio
ref: ${{ env.REF }}

- name: Add to rasterio setup.cfg
shell: bash
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

- name: Cache vcpkg
uses: actions/cache@v1
uses: actions/cache@v3
id: vcpkgcache
with:
path: C:/vcpkg/installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('.github/workflows/*') }}
path: "$VCPKG_INSTALLATION_ROOT/installed"
key: ${{ runner.os }}-vcpkg-${{ hashFiles('.github/workflows/*', 'vcpkg.json') }}-1

- name: Install GDAL
- name: Bootstrap vcpkg
env:
VCPKG_DEFAULT_TRIPLET: x64-windows
run: |
vcpkg install gdal:x64-windows
vcpkg list
- name: Debug listing
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: |
ls C:/vcpkg/installed/x64-windows
ls C:/vcpkg/installed/x64-windows/lib
find c:/vcpkg -name gdal*.lib
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: ${{ matrix.vcpkg_logs }}
path: "C:/vcpkg/buildtrees/**/*.log"

- name: Checkout
uses: actions/checkout@v3
with:
repository: rasterio/rasterio
fetch-depth: 0
ref: ${{ env.REF }}

- name: Add to rasterio 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/cibuildwheel@v2.3.1
env:
CIBW_SKIP: "*-win32 pp*"
CIBW_ENVIRONMENT_WINDOWS:
VCPKG_INSTALL="$VCPKG_INSTALLATION_ROOT/installed/x64-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_LIB="$VCPKG_INSTALL/share/proj/data"
GDAL_VERSION="3.5.1"
GDAL_VERSION="3.5.2"
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}

Expand Down Expand Up @@ -129,4 +140,10 @@ jobs:
rio env --formats
python test_fiona_issue383.py
cp -R rasterio/tests tests
PROJ_NETWORK=ON python -m pytest -vv tests -m "not gdalbin" -k "not test_ensure_env_decorator_sets_gdal_data_prefix and not test_tiled_dataset_blocksize_guard and not test_untiled_dataset_blocksize and not test_positional_calculation_byindex and not test_transform_geom_polygon and not test_reproject_error_propagation and not test_issue2353 and not test_info_azure_unsigned and not test_decimated_no_use_overview and not test_datasetreader_ctor_url"
PROJ_NETWORK=ON python -m pytest -vv tests -m "not gdalbin" -k "not test_ensure_env_decorator_sets_gdal_data_prefix and not test_tiled_dataset_blocksize_guard and not test_untiled_dataset_blocksize and not test_positional_calculation_byindex and not test_transform_geom_polygon and not test_reproject_error_propagation and not test_issue2353 and not test_info_azure_unsigned and not test_decimated_no_use_overview and not test_datasetreader_ctor_url and not test_copyfiles_same_dataset_another_name and not test_python_file_reuse"
- name: Check for conflicts with fiona wheel
shell: bash
run: |
python -m pip install --pre fiona
python -c "import fiona; import rasterio; print(rasterio.show_versions())"
6 changes: 5 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "rasterio",
"version": "1.3.3",
"dependencies": [ "gdal" ],
"builtin-baseline": "6ca56aeb457f033d344a7106cb3f9f1abf8f4e98",
"overrides": [
{ "name": "gdal", "version": "3.4.3#2" }
{ "name": "gdal", "version": "3.5.2" },
{ "name": "proj", "version": "9.0.1" }
]
}

0 comments on commit 0eed1dd

Please sign in to comment.