-
Notifications
You must be signed in to change notification settings - Fork 12
70 lines (58 loc) · 2.18 KB
/
ci_action_win_standalone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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