forked from device-management-toolkit/rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (68 loc) · 2.44 KB
/
ci.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
70
71
72
73
74
#*********************************************************************
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#*********************************************************************/
name: Build RPC (Native)
on:
pull_request:
branches: [ master ]
env:
BUILD_TYPE: Release
jobs:
build-windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Create Build Dir
run: mkdir build
- name: Clone
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
- name: Build VCPKG
run: cd vcpkg && bootstrap-vcpkg.bat
shell: cmd
- name: dir
run: ls
- name: dir
run: cd vcpkg && ls
- name: Install C++ REST SDK
run: ${{ runner.workspace }}\rpc\vcpkg\vcpkg.exe install cpprestsdk[websockets]:x64-windows-static
shell: cmd
- name: dir
run: ls && cd vcpkg && ls
shell: bash
- name: Prepare for build
run: cd build && cmake .. -DCMAKE_PREFIX_PATH=D:/a/rpc/rpc/vcpkg/installed/x64-windows-static -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=D:/a/rpc/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build RPC (Release)
run: cd build && cmake --build . --config Release
- name: Build RPC (Debug)
run: cd build && cmake --build . --config Debug
build-linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: sudo apt install git cmake build-essential curl zip unzip tar pkg-config
- name: Create Build Dir
run: mkdir build
- name: Clone
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
- name: Build VCPKG
run: cd vcpkg && ./bootstrap-vcpkg.sh
shell: bash
- name: dir
run: ls
- name: dir
run: cd vcpkg && ls
- name: Install C++ REST SDK
run: ${{ runner.workspace }}/rpc/vcpkg/vcpkg install cpprestsdk[websockets]
shell: bash
- name: dir
run: ls && cd vcpkg && ls
shell: bash
- name: Prepare for build
run: cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/rpc/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build RPC
run: cd build && cmake --build .