Skip to content

Commit

Permalink
WIP windows action
Browse files Browse the repository at this point in the history
  • Loading branch information
Osyotr committed Apr 9, 2024
1 parent 6dd4517 commit 7ea5d3d
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 2 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/windows-check.yaml
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
4 changes: 2 additions & 2 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ fi
if [ ! -d "$BASE_PATH/3party/boost/" ]; then
echo "You need to have Boost submodule present to run bootstrap.sh"
echo "Try 'git submodule update --init --recursive'"
exit 1
#exit 1
fi
if [ ! -d "$BASE_PATH/3party/boost/tools" ]; then
echo "Boost's submodule 'tools' is missing, it is required for bootstrap"
echo "Try 'git submodule update --init --recursive'"
exit 1
#exit 1
fi

cd "$BASE_PATH/3party/boost/"
Expand Down

0 comments on commit 7ea5d3d

Please sign in to comment.