Skip to content

Commit

Permalink
Migrate Windows CI to GitHub Actions. (Project-OSRM#6312)
Browse files Browse the repository at this point in the history
It is quite difficult to maintain current Windows CI, because it uses pre-compiled dependencies stored on wolt.com server and there is low chance to find someone who is able to update it.
  • Loading branch information
SiarheiFedartsou authored and mattwigway committed Jul 20, 2023
1 parent 870a493 commit 58451c8
Showing 6 changed files with 141 additions and 220 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/osrm-backend.yml
Original file line number Diff line number Diff line change
@@ -20,6 +20,27 @@ env:
ENABLE_NODE_BINDINGS: "ON"

jobs:
windows:
needs: format-taginfo-docs
runs-on: windows-2022
continue-on-error: false
steps:
- uses: actions/checkout@v3
- run: pip install conan==1.50.0
- run: conan --version
- run: cmake --version
- uses: actions/setup-node@v3
with:
node-version: 16
- run: node --version
- run: npm --version
- run: npm install --ignore-scripts
- run: npm link --ignore-scripts
- uses: microsoft/[email protected]
- name: Build
run: |
.\scripts\ci\windows-build.bat
format-taginfo-docs:
runs-on: ubuntu-20.04
steps:
@@ -642,6 +663,6 @@ jobs:

ci-complete:
runs-on: ubuntu-18.04
needs: build-test-publish
needs: [build-test-publish, docker-image, windows]
steps:
- run: echo "CI complete"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
- FIXED: Fix bug with reading Set values from Lua scripts. [#6285](https://github.com/Project-OSRM/osrm-backend/pull/6285)
- FIXED: Bug in bicycle profile that caused exceptions if there is a highway=bicycle in the data. [#6296](https://github.com/Project-OSRM/osrm-backend/pull/6296)
- Build:
- CHANGED: Migrate Windows CI to GitHub Actions. [#6312](https://github.com/Project-OSRM/osrm-backend/pull/6312)
- ADDED: Add smoke test for Docker image. [#6313](https://github.com/Project-OSRM/osrm-backend/pull/6313)
- CHANGED: Update libosmium to version 2.18.0. [#6303](https://github.com/Project-OSRM/osrm-backend/pull/6303)
- CHANGED: Remove EXACT from find_package if using Conan. [#6299](https://github.com/Project-OSRM/osrm-backend/pull/6299)
17 changes: 16 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -356,7 +356,6 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel -wd10237 -Wall -ipo -fPIC")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# using Visual Studio C++
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} zlib)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # avoid compiler error C1128 from scripting_environment_lua.cpp
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32_LEAN_AND_MEAN") # avoid compiler error C2011 from dual #include of winsock.h and winsock2.h
add_dependency_defines(-DBOOST_LIB_DIAGNOSTIC)
@@ -446,6 +445,11 @@ add_subdirectory(${FLATBUFFERS_SRC_DIR}
${CMAKE_CURRENT_BINARY_DIR}/flatbuffers-build
EXCLUDE_FROM_ALL)

# see https://stackoverflow.com/questions/70898030/boost-link-error-using-conan-find-package
if (MSVC)
add_definitions(-DBOOST_ALL_NO_LIB)
endif()

if(ENABLE_CONAN)
message(STATUS "Installing dependencies via Conan")

@@ -462,6 +466,16 @@ if(ENABLE_CONAN)
set(CONAN_TBB_VERSION 2020.3)

set(CONAN_SYSTEM_INCLUDES ON)

# TODO:
# if we link TBB dynamically osrm-extract.exe finishes on the first access to any TBB symbol
# with exit code = -1073741515, which means that program cannot load required DLL.
if (MSVC)
set(TBB_SHARED False)
else()
set(TBB_SHARED True)
endif()

conan_cmake_run(
REQUIRES
boost/${CONAN_BOOST_VERSION}
@@ -475,6 +489,7 @@ if(ENABLE_CONAN)
KEEP_RPATHS
NO_OUTPUT_DIRS
OPTIONS boost:filesystem_version=3 # https://stackoverflow.com/questions/73392648/error-with-boost-filesystem-version-in-cmake
tbb:shared=${TBB_SHARED}
)

add_dependency_includes(${CONAN_INCLUDE_DIRS_BOOST})
194 changes: 0 additions & 194 deletions appveyor-build.bat

This file was deleted.

27 changes: 3 additions & 24 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
environment:
matrix:
- configuration: Release
# - configuration: Debug

install:
- ps: Install-Product node 6

# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input

os: Visual Studio 2019

# clone directory
clone_folder: c:\projects\osrm

platform: x64

# no-op for the time being until someone with access to GitHub checks settings will remove integration with AppVeyor
# https://github.com/Project-OSRM/osrm-backend/pull/6312#issuecomment-1217237055
build_script:
- CALL appveyor-build.bat

before_test:
- node --version
- npm --version
- npm install --ignore-scripts
- npm link --ignore-scripts
- SET PATH=%CD%\osrm-deps\lib;%PATH%
- SET OSRM_BUILD_DIR=build\%Configuration%
# TODO tests fail with "JavaScript heap out of memory", need a better host?
# - npm test
- EXIT 0

branches:
only:
- master

Loading

0 comments on commit 58451c8

Please sign in to comment.