osrm-backend #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: osrm-backend | |
on: [workflow_dispatch] | |
jobs: | |
build_wheels: | |
name: osrm-backend, ${{ matrix.platform }} | |
runs-on: ${{ matrix.platform }}-${{ matrix.version }} | |
strategy: | |
fail-fast: true | |
matrix: | |
platform: [macos, windows] | |
version: [latest] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
ARTIFACT_WORKFLOW: osrm-backend.yml | |
steps: | |
- name: Checkout osrm-backend | |
uses: actions/checkout@v3 | |
with: | |
repository: Project-OSRM/osrm-backend | |
ref: db7946d76246cb10a5710c8f2851997417940b55 | |
submodules: true | |
fetch-depth: 1 | |
path: osrm-backend | |
- name: Build osrm-backend (macos) | |
if: matrix.platform == 'macos' | |
working-directory: osrm-backend | |
run: | | |
export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 | |
brew install lua tbb [email protected] | |
brew link [email protected] | |
mkdir build && cd build | |
cmake .. | |
make -j$((`sysctl -n hw.ncpu`+1)) | |
cd ../ | |
tar -czf osrm-backend.tgz build/libosrm* build/osrm-* include profiles third_party/flatbuffers third_party/variant | |
du -h osrm-backend.tgz | |
- uses: microsoft/[email protected] | |
if: matrix.platform == 'windows' | |
- name: Build osrm-backend (Windows) | |
if: matrix.platform == 'windows' | |
run: | | |
pip install "conan<2.0.0" | |
cd osrm-backend | |
mkdir build && cd build | |
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -A x64 -G "Visual Studio 17 2022" -DCMAKE_INSTALL_PREFIX:PATH="C:/OSRM" .. | |
msbuild INSTALL.vcxproj /p:Configuration=Release /p:Platform=x64 /t:rebuild /p:BuildInParallel=true /m /toolsversion:Current /clp:Verbosity=normal /nologo | |
cd ../ | |
tar -czhf osrm-backend.tgz C:\OSRM C:\.conan C:\Users\runneradmin\.conan | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: osrm-backend_${{ matrix.platform }} | |
path: osrm-backend/osrm-backend.tgz | |
if-no-files-found: error |