From 0dda4c204b93311a1509b97663d1bf754cf9aa10 Mon Sep 17 00:00:00 2001 From: Yaroslav Stefinko Date: Mon, 2 Sep 2024 11:39:56 +0300 Subject: [PATCH] Add windows build on VS2019 Validation on windows runner: windows-2019 using type: RelWithDebInfo and GENERATOR: "Visual Studio 16 2019" Relates-To: MINOR Signed-off-by: Yaroslav Stefinko --- .github/workflows/psv_pipelines.yml | 21 +++++++++++++++++---- scripts/windows/build.sh | 8 ++++---- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/psv_pipelines.yml b/.github/workflows/psv_pipelines.yml index 8e7fa4a45..251ef6db0 100644 --- a/.github/workflows/psv_pipelines.yml +++ b/.github/workflows/psv_pipelines.yml @@ -44,7 +44,7 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - name: Install Ubuntu dependencies - run: sudo rm /etc/apt/sources.list.d/microsoft-prod.list && sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-9 g++-9 --no-install-recommends + run: sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-9 g++-9 --no-install-recommends shell: bash - name: Compile project with cmake and ccache run: gcc --version && ./scripts/linux/psv/build_psv.sh @@ -87,7 +87,7 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - name: Install Ubuntu dependencies - run: sudo rm /etc/apt/sources.list.d/microsoft-prod.list && sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev --no-install-recommends + run: sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev --no-install-recommends shell: bash - name: Compile project with cmake and ccache run: gcc --version && ./scripts/linux/psv/build_psv.sh @@ -121,7 +121,7 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - name: Install Ubuntu dependencies - run: sudo rm /etc/apt/sources.list.d/microsoft-prod.list && sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-13 g++-13 --no-install-recommends + run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-13 g++-13 --no-install-recommends shell: bash - name: Compile project with cmake and ccache run: gcc --version && ./scripts/linux/psv/build_psv.sh @@ -136,7 +136,7 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - name: Install Ubuntu dependencies - run: sudo rm /etc/apt/sources.list.d/microsoft-prod.list && sudo apt-get update && sudo apt-get install -y libboost-all-dev libssl-dev libcurl4-openssl-dev --no-install-recommends + run: sudo apt-get update && sudo apt-get install -y libboost-all-dev libssl-dev libcurl4-openssl-dev --no-install-recommends shell: bash - name: Compile project without cache run: ./scripts/linux/psv/build_psv_no_cache.sh @@ -258,6 +258,19 @@ jobs: run: scripts/ios/azure_ios_build_psv.sh shell: bash + psv-win-16-vc2019-build: + name: PSV.Win.VC2019 + runs-on: windows-2019 + env: + BUILD_TYPE: RelWithDebInfo + GENERATOR: "Visual Studio 16 2019" + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Build + run: scripts/windows/build.sh + shell: bash + psv-commit-checker: name: PSV.Commit.Checker runs-on: ubuntu-20.04 diff --git a/scripts/windows/build.sh b/scripts/windows/build.sh index 47ed99573..d80b905a6 100755 --- a/scripts/windows/build.sh +++ b/scripts/windows/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # -# Copyright (C) 2019-2021 HERE Europe B.V. +# Copyright (C) 2019-2024 HERE Europe B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ # SPDX-License-Identifier: Apache-2.0 # License-Filename: LICENSE - +env [[ -d "build" ]] && rm -rf build mkdir build && cd build -cmake .. -G "Visual Studio 16 2019" -A x64 \ - -DCMAKE_BUILD_TYPE=$BUILD_TYPE +cmake .. -G "${GENERATOR}" -A x64 \ + -DBUILD_TYPE=$BUILD_TYPE -DCMAKE_BUILD_TYPE=$BUILD_TYPE cmake --build . --config $BUILD_TYPE