Skip to content

Feature/master and subscribers #2650

Feature/master and subscribers

Feature/master and subscribers #2650

name: Win-Standalone-CI
on: [push, pull_request]
env:
BUILD_TYPE: "Release"
BOOST_ROOT: ${{github.workspace}}/3rdparty/boost
BOOST_URL: https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
build:
runs-on: [windows-2019]
steps:
- uses: actions/checkout@v2
- name: Restore Boost cache
uses: actions/cache@v2
id: cache-boost
with:
path: ${{env.BOOST_ROOT}}
key: boost
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: |
# fix up paths to be forward slashes consistently
BOOST_ROOT=$(echo $BOOST_ROOT | sed 's/\\/\//g')
mkdir -p $BOOST_ROOT
curl --progress-bar --location --output $BOOST_ROOT/download.tar.bz2 $BOOST_URL
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar.bz2 -y -bd
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar -y -bd
cd $BOOST_ROOT && cp -r boost_*/* .
rm -rf boost_*/* download.tar.bz2 download.tar
shell: bash
- name: Install deps with vcpkg
shell: bash
run: |
vcpkg install console-bridge:x64-windows
vcpkg integrate install
- name: Clone fmt
shell: bash
working-directory: ${{runner.workspace}}
run: git clone https://github.com/fmtlib/fmt.git --depth 1 --branch 6.1.2
- name: Install fmt
shell: cmd
working-directory: ${{runner.workspace}}/fmt
run: |
cmake -G "Visual Studio 16 2019" .
cmake --build . --config %BUILD_TYPE% --target ALL_BUILD
cmake --build . --config %BUILD_TYPE% --target INSTALL
- name: Configure and build CMake
shell: cmd
working-directory: ${{runner.workspace}}/psen_scan_v2/standalone
run: |
cmake -G "Visual Studio 16 2019" -A x64 ^
-DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%/scripts/buildsystems/vcpkg.cmake ^
-S . -B build -DBUILD_TESTING=ON
cmake --build build --config %BUILD_TYPE% --target ALL_BUILD
- name: Test
working-directory: ${{runner.workspace}}/psen_scan_v2/standalone
shell: bash
run: cmake --build build --config $BUILD_TYPE --target RUN_TESTS