forked from organicmaps/organicmaps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: Windows check | ||
on: | ||
workflow_dispatch: # Manual trigger | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
paths-ignore: | ||
- .gitignore | ||
- .github/** | ||
- '!.github/workflows/windows-check.yaml' # Run check on self change | ||
- CONTRIBUTORS | ||
- LICENSE | ||
- NOTICE | ||
- README.md | ||
- android/** | ||
- iphone/** | ||
- data/strings/** | ||
- docs/** | ||
- packaging/** | ||
- platform/*apple* | ||
- platform/*_android* | ||
- platform/*_ios* | ||
- platform/*_mac* | ||
- platform/*_linux* | ||
- pyhelpers/** | ||
- tools/** | ||
- '!tools/python/test_server/**' | ||
- xcode/** | ||
|
||
jobs: | ||
windows-matrix: | ||
name: Windows builds | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build_type: [{ CMAKE_BUILD_TYPE: Debug, CMAKE_MSVC_RUNTIME_LIBRARY: MultiThreadedDebug }, { CMAKE_BUILD_TYPE: Release, CMAKE_MSVC_RUNTIME_LIBRARY: MultiThreaded }] | ||
# Cancels previous jobs if the same branch or PR was updated again. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ matrix.build_type.CMAKE_BUILD_TYPE }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
# Can probably skip more since we use vcpkg | ||
- name: Parallel submodules checkout | ||
shell: bash | ||
run: | | ||
git \ | ||
-c submodule."3party/fast_double_parser/benchmarks/dependencies/abseil-cpp".update=none \ | ||
-c submodule."3party/fast_double_parser/benchmarks/dependencies/double-conversion".update=none \ | ||
-c submodule."3party/Vulkan-Headers".update=none \ | ||
-c submodule."3party/boost".update=none \ | ||
-c submodule."3party/expat".update=none \ | ||
-c submodule."3party/freetype/freetype".update=none \ | ||
-c submodule."3party/freetype/freetype/subprojects/dlg".update=none \ | ||
-c submodule."3party/gflags".update=none \ | ||
-c submodule."3party/googletest".update=none \ | ||
-c submodule."3party/harfbuzz/harfbuzz".update=none \ | ||
-c submodule."3party/icu/icu".update=none \ | ||
-c submodule."3party/jansson/jansson".update=none \ | ||
-c submodule."3party/protobuf".update=none \ | ||
-c submodule."3party/protobuf/protobuf/third_party/benchmark".update=none \ | ||
-c submodule."3party/pugixml/pugixml".update=none \ | ||
-c submodule."3party/utfcpp".update=none \ | ||
submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) | ||
- name: Install CMake and Ninja | ||
uses: lukka/get-cmake@latest | ||
with: | ||
cmakeVersion: 3.29.0 | ||
|
||
- name: Developer Command Prompt for Microsoft Visual C++ | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
# See https://github.com/actions/runner-images/issues/9398 | ||
toolset: 14.39 | ||
|
||
# Remove? | ||
- name: Configure | ||
shell: bash | ||
run: ./configure.sh | ||
|
||
- name: CMake | ||
shell: bash | ||
run: | | ||
echo "Building ${{ matrix.build_type.CMAKE_BUILD_TYPE }}" | ||
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type.CMAKE_BUILD_TYPE }} \ | ||
-DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.build_type.CMAKE_MSVC_RUNTIME_LIBRARY }} \ | ||
-DWITH_SYSTEM_PROVIDED_3PARTY=ON \ | ||
-DUNITY_DISABLE=ON \ | ||
-DOMIM_USE_VCPKG=ON \ | ||
-DX_VCPKG_CLONE_DIR="${{ github.workspace }}/build/vcpkg" \ | ||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/build/vcpkg/scripts/buildsystems/vcpkg.cmake" \ | ||
-DVCPKG_TARGET_TRIPLET=x64-windows-static \ | ||
-DVCPKG_HOST_TRIPLET=x64-windows-static \ | ||
-DVCPKG_INSTALL_OPTIONS="--disable-metrics;--no-print-usage;--x-abi-tools-use-exact-versions;--clean-buildtrees-after-build;--clean-packages-after-build" | ||
- name: Compile | ||
shell: bash | ||
working-directory: build | ||
run: ninja |
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