Skip to content

Commit

Permalink
Migrate Windows CI to GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
SiarheiFedartsou committed Aug 19, 2022
1 parent 624fea6 commit 4635664
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 231 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/osrm-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/setup-msbuild@v1.1
- name: Build
run: |
.\scripts\ci\windows-build.bat
format-taginfo-docs:
runs-on: ubuntu-20.04
steps:
Expand Down
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -446,6 +445,10 @@ add_subdirectory(${FLATBUFFERS_SRC_DIR}
${CMAKE_CURRENT_BINARY_DIR}/flatbuffers-build
EXCLUDE_FROM_ALL)

if (MSVC)
add_definitions(-DBOOST_ALL_NO_LIB)
endif()

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

Expand All @@ -462,6 +465,13 @@ if(ENABLE_CONAN)
set(CONAN_TBB_VERSION 2020.3)

set(CONAN_SYSTEM_INCLUDES ON)

if (MSVC)
set(TBB_SHARED False)
else()
set(TBB_SHARED True)
endif()

conan_cmake_run(
REQUIRES
boost/${CONAN_BOOST_VERSION}
Expand All @@ -475,6 +485,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})
Expand Down
194 changes: 0 additions & 194 deletions appveyor-build.bat

This file was deleted.

36 changes: 0 additions & 36 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit 4635664

Please sign in to comment.