Skip to content

Commit

Permalink
update valhalla to 3.3.0 (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsnolde committed Apr 13, 2023
1 parent 0177ad5 commit f0cea94
Show file tree
Hide file tree
Showing 1,066 changed files with 196,670 additions and 85,388 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/custom_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
# cxx: 'Visual Studio'
# - macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Configure Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.10'

# keep in-sync with the other yaml
- name: Cache Conan
Expand Down Expand Up @@ -62,7 +64,7 @@ jobs:

- uses: pypa/cibuildwheel@v2.3.1
env:
MACOSX_DEPLOYMENT_TARGET: 10.9
MACOSX_DEPLOYMENT_TARGET: 10.15
CIBW_BUILD: cp310* cp39* cp38*

- name: Upload wheels
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/publish_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:

- name: Configure Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

# keep in-sync with the other yaml
- name: Cache Conan (MacOS)
Expand All @@ -46,7 +48,7 @@ jobs:
if: matrix.platform == 'windows' # && steps.cache-conan.outputs.cache-hit != 'true'
run: |
pip install pip --upgrade
pip install "conan<2.0.0"
pip install conan<2.0.0
conan profile new default --detect
conan profile update "settings.compiler=Visual Studio" default
conan profile update "settings.compiler.version=16" default
Expand All @@ -57,14 +59,14 @@ jobs:
if: matrix.platform == 'macos' && steps.cache-conan.outputs.cache-hit != 'true'
run: |
pip install pip --upgrade
pip install "conan<2.0.0"
pip install conan<2.0.0
conan profile new default --detect
conan config set "storage.path=${{ github.workspace }}/conan_data"
conan install --install-folder ${{ github.workspace }}/conan_build --remote conancenter .
- uses: pypa/cibuildwheel@v2.3.1
env:
MACOSX_DEPLOYMENT_TARGET: 10.9
MACOSX_DEPLOYMENT_TARGET: 10.15

- name: Upload wheels
uses: actions/upload-artifact@v2
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,29 @@ on:
jobs:
build_wheels:
name: PR - cp*, ubuntu-latest
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Configure Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Lint & Style Check
- name: Install Conan (MacOS)
run: |
python install -r dev-requirements.txt
pre-commit run --all-files --show-diff-on-failure
pip install pip --upgrade
pip install "conan<2.0.0"
conan profile new default --detect
conan config set "storage.path=${{ github.workspace }}/conan_data"
conan install --install-folder ${{ github.workspace }}/conan_build --remote conancenter .
- uses: pypa/cibuildwheel@v2.12.1
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
CIBW_BUILD: cp37* cp311*

- uses: pypa/cibuildwheel@v2.3.1
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
path: wheelhouse/*.whl
5 changes: 4 additions & 1 deletion .github/workflows/push_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:

- name: Configure Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

# keep in-sync with the other yaml
# only macos makes sense, windows didn't work, linux installs conan inside the docker image
Expand Down Expand Up @@ -71,5 +73,6 @@ jobs:
# only build the earliest supported python version
- uses: pypa/cibuildwheel@v2.3.1
env:
MACOSX_DEPLOYMENT_TARGET: 10.9
MACOSX_DEPLOYMENT_TARGET: 10.15
CIBW_BUILD: cp37*
CIBW_TEST_COMMAND: ''
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,6 @@ dmypy.json

# Pyre type checker
.pyre/

# Mac
custom_protobuf
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## Unreleased

## [3.0.5](https://pypi.org/project/pyvalhalla/3.0.4/) - 2023-04-13

_Valhalla version 3.3.0_

### CHANGED

- Mac OSX support only from 10.15 on
- bumped Valhalla version to 3.3.0

### REMOVED

- deprecated `transit_available` endpoint

## [3.0.4](https://pypi.org/project/pyvalhalla/3.0.4/) - 2023-04-12

_Valhalla version 3.1.4_
Expand Down
2 changes: 1 addition & 1 deletion build-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ setuptools>=45
wheel
setuptools_scm>=6.2
setuptools_scm_git_archive
pybind11>=2.8.0
pybind11>=2.10.4
27 changes: 16 additions & 11 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ Proto headers have to be compiled on each platform separately.

#### Linux

Fire up the `ghcr.io/gis-ops/manylinux:valhalla_python` image which has all dependencies installed and build valhalla:
Fire up the `ghcr.io/gis-ops/manylinux:2_28_valhalla_python` image which has all dependencies installed and build valhalla:

```
docker run -dt -v $PWD:/valhalla-py --name valhalla-py ghcr.io/gis-ops/manylinux:valhalla_python
docker run -dt -v $PWD:/valhalla-py --name valhalla-py ghcr.io/gis-ops/manylinux:2_28_valhalla_python
./scripts/build_linux.sh
sudo chown -R nilsnolde:nilsnolde .
```
Expand All @@ -79,7 +79,14 @@ That'll take care of all the header & library copying, proto compilation etc. It

#### Mac OS

> Note, for OSX we locally built protobuf from source (currently 3.21.5) as the `brew` version is not compiled to work with lower OSX versions.
> Note, for OSX we locally built protobuf from source (currently 3.21.5) as the `brew` version is not compiled to work with lower OSX versions:
```
cd custom_protobuf
cmake -B build -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -Dprotobuf_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON
make -C build -j8
sudo make -C build install
```


Pretty identical to Linux, just we don't need a docker container of course:
```
Expand All @@ -96,15 +103,13 @@ python -c "from valhalla import Actor; a = Actor('valhalla.json')"

#### Windows

First build Valhalla:
First build Valhalla (or set up your `.vscode/settings.json` properly, hint: `cmake.sourceDirectory/buildDirectory`):
```
cmake -Bupstream/build -Supstream -DENABLE_TOOLS=OFF -DENABLE_HTTP=OFF -DENABLE_DATA_TOOLS=ON -DENABLE_PYTHON_BINDINGS=ON -DENABLE_SERVICES=OFF -DENABLE_TESTS=OFF -DENABLE_CCACHE=OFF -DENABLE_COVERAGE=OFF -DENABLE_BENCHMARKS=OFF -DENABLE_SINGLE_FILES_WERROR=OFF -DLUA_INCLUDE_DIR=C:\Users\nilsn\Documents\dev\vcpkg\installed\x64-windows\include\luajit -DLUA_LIBRARIES=C:\Users\nilsn\Documents\dev\vcpkg\installed\x64-windows\lib\lua51.lib -DPython_EXECUTABLE=C:\Users\nilsn\AppData\Local\Programs\Python\Python39\python.exe -DPython_LIBRARIES=C:\Users\nilsn\AppData\Local\Programs\Python\Python39\libs\python39.lib -DPython_INCLUDE_DIRS=C:\Users\nilsn\AppData\Local\Programs\Python\Python39\include -DCMAKE_TOOLCHAIN_FILE=C:\Users\nilsn\Documents\dev\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -T host=x64 -A x64
cmake --build upstream/build --config Release --target valhalla -j 8 -- /clp:ErrorsOnly
cmake -Bupstream/build -Supstream -DENABLE_TOOLS=OFF -DENABLE_HTTP=OFF -DENABLE_DATA_TOOLS=OFF -DENABLE_PYTHON_BINDINGS=OFF -DENABLE_SERVICES=OFF -DENABLE_TESTS=OFF -DENABLE_CCACHE=OFF -DENABLE_COVERAGE=OFF -DENABLE_BENCHMARKS=OFF -DENABLE_SINGLE_FILES_WERROR=OFF -DCMAKE_TOOLCHAIN_FILE=C:\Users\nilsn\dev\cpp\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -T host=x64 -A x64
cmake --build upstream/build --config Release --target valhalla -j 8 -- /clp:ErrorsOnly /p:BuildInParallel=true /m:8
protoc.exe --proto_path=upstream/proto --cpp_out=include/windows/valhalla/proto upstream/proto/*.proto
# protobuf 3.12.3 seems to have problems with spelling: https://github.com/protocolbuffers/protobuf/issues/7522
# need to patch here:
# replace all occurrences of "AuxillaryParseTableField" with "AuxiliaryParseTableField"
```

The only area where Windows is shining: makes it really simple, just copy the headers & libs from `vcpkg`.
Since `3.3.0` it also needs `dirent.h` from Valhalla's `third_party/dirent`.

The only area where Windows is shining: makes it really simple, just copy the headers & libs from `vcpkg`. **Note**, it'll need the DLLs, **not** the static `.lib`s.
Loading

0 comments on commit f0cea94

Please sign in to comment.