-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (76 loc) · 2.02 KB
/
Copy pathcpp_ci.yml
File metadata and controls
84 lines (76 loc) · 2.02 KB
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
75
76
77
78
79
80
81
82
83
84
name: C++ Continuous Integration
on:
push:
branches: [ main, develop ]
paths-ignore:
- CSharp/**
- .github/**
- java/**
- .gitignore
pull_request:
branches: [ main, develop ]
paths-ignore:
- CSharp/**
- java/**
- .github/**
- .gitignore
env:
CC: cl.exe
CXX: cl.exe
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.3.1
- name: Integrate vcpkg
id: vckpkg_integrate
shell: 'powershell'
working-directory: ./cpp
run: |
vcpkg.exe integrate install
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.12.1
- name: Install build tools
run: |
choco install ninja
- name: Install GTest package
id: vckpkg_install_gtest
shell: 'powershell'
working-directory: ./cpp
run: |
vcpkg install gtest:x64-windows
- name: Configure
working-directory: ./cpp
shell: 'powershell'
run: |
cmake `
-B build `
-G "Ninja" `
-S . `
-D CMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE="c:/vcpkg/scripts/buildsystems/vcpkg.cmake" `
-DVERBOSE_CONFIGURE=ON
- name: Build
shell: 'powershell'
working-directory: ./cpp
run: |
cmake --build build
- name: Tests
shell: 'powershell'
working-directory: ./cpp/target/Release/x64
run: |
./credential_store_test.exe
# - name: Install Strip
# run: ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/cmake --install build --prefix instdir --strip
# - name: Pack
# working-directory: instdir
# run: ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/cmake -E tar cJfv ../windows-msvc.tar.xz .
# - name: Upload
# uses: actions/upload-artifact@v1
# with:
# path: ./windows-msvc.tar.xz
# name: windows-msvc.tar.xz