-
Notifications
You must be signed in to change notification settings - Fork 99
183 lines (156 loc) · 9.2 KB
/
windows_build.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: Windows Build
# This machine tests building the software on a both 32 and 64 Windows architecture.
on: [push]
jobs:
souce_build:
name: Build dist with Linux
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install prerequisites
run: |
set -x
sudo apt install libpcsclite-dev check gengetopt help2man zlib1g-dev
- name: Create tar.gz
run: |
set -x
./resources/make_src_dist.sh
cd ..
mkdir artifact
mv $GITHUB_WORKSPACE/yubico-piv-tool-.tar.gz artifact/
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: yubico-piv-tool-src
path: ../artifact
win2019_x86:
name: Windows Server 2019 - x86
needs: souce_build
runs-on: windows-2019
steps:
- name: Download source from job_1
uses: actions/download-artifact@v1
with:
name: yubico-piv-tool-src
- name: Extract source
run: |
Set-PSDebug -Trace 1
cd yubico-piv-tool-src
tar xf yubico-piv-tool-.tar.gz
- name: install prerequisites for x86 architecture
run: |
Set-PSDebug -Trace 1
vcpkg install openssl:x86-windows
vcpkg install getopt:x86-windows
vcpkg install check:x86-windows
vcpkg install zlib:x86-windows
- name: build for x86 architecture
run: |
Set-PSDebug -Trace 1
$env:Path ="C:/vcpkg/packages/openssl_x86-windows;$env:Path"
$env:include ="C:/vcpkg/packages/openssl_x86-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
mkdir build; cd build
cmake -A Win32 -DVERBOSE_CMAKE=ON -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x86-windows ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x86-windows/bin;C:/vcpkg/packages/openssl_x86-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build with YKCS11_DBG is set
run: |
Set-PSDebug -Trace 1
$env:Path ="C:/vcpkg/packages/openssl_x86-windows;$env:Path"
$env:include ="C:/vcpkg/packages/openssl_x86-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A Win32 -DVERBOSE_CMAKE=ON -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x86-windows -DYKCS11_DBG=3 ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x86-windows/bin;C:/vcpkg/packages/openssl_x86-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build only library (no CLI and no ykcs11)
run: |
Set-PSDebug -Trace 1
$env:Path ="C:/vcpkg/packages/openssl_x86-windows;$env:Path"
$env:include ="C:/vcpkg/packages/openssl_x86-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A Win32 -DVERBOSE_CMAKE=ON -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x86-windows -DBUILD_ONLY_LIB=ON ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x86-windows/bin;C:/vcpkg/packages/openssl_x86-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build only dynamic libaries
run: |
Set-PSDebug -Trace 1
$env:Path ="C:/vcpkg/packages/openssl_x86-windows;$env:Path"
$env:include ="C:/vcpkg/packages/openssl_x86-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A Win32 -DVERBOSE_CMAKE=ON -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x86-windows -DBUILD_STATIC_LIB=OFF ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x86-windows/bin;C:/vcpkg/packages/openssl_x86-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
win2019_x64:
name: Windows Server 2019 - x64
needs: souce_build
runs-on: windows-2019
steps:
- name: Download source from job_1
uses: actions/download-artifact@v1
with:
name: yubico-piv-tool-src
- name: Extract source
run: |
Set-PSDebug -Trace 1
cd yubico-piv-tool-src
tar xf yubico-piv-tool-.tar.gz
- name: install prerequisites for x64 architecture
run: |
Set-PSDebug -Trace 1
vcpkg install openssl:x64-windows
vcpkg install getopt:x64-windows
vcpkg install check:x64-windows
vcpkg install zlib:x64-windows
- name: build for x64 architecture
run: |
Set-PSDebug -Trace 1
$env:Path ="C:\vcpkg\packages\openssl_x64-windows;$env:Path"
$env:include ="C:\vcpkg\packages\openssl_x64-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
mkdir build; cd build
cmake -A x64 -DVERBOSE_CMAKE=ON -DBACKEND=winscard -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x64-windows ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x64-windows/bin;C:/vcpkg/packages/openssl_x64-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build with YKCS11_DBG is set
run: |
Set-PSDebug -Trace 1
$env:Path ="C:\vcpkg\packages\openssl_x64-windows;$env:Path"
$env:include ="C:\vcpkg\packages\openssl_x64-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A x64 -DVERBOSE_CMAKE=ON -DBACKEND=winscard -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x64-windows -DYKCS11_DBG=3 ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x64-windows/bin;C:/vcpkg/packages/openssl_x64-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build only library (no CLI and no ykcs11)
run: |
Set-PSDebug -Trace 1
$env:Path ="C:\vcpkg\packages\openssl_x64-windows;$env:Path"
$env:include ="C:\vcpkg\packages\openssl_x64-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A x64 -DVERBOSE_CMAKE=ON -DBACKEND=winscard -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x64-windows -DBUILD_ONLY_LIB=ON ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x64-windows/bin;C:/vcpkg/packages/openssl_x64-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build only dynamic libaries
run: |
Set-PSDebug -Trace 1
$env:Path ="C:\vcpkg\packages\openssl_x64-windows;$env:Path"
$env:include ="C:\vcpkg\packages\openssl_x64-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A x64 -DVERBOSE_CMAKE=ON -DBACKEND=winscard -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x64-windows -DBUILD_STATIC_LIB=OFF ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x64-windows/bin;C:/vcpkg/packages/openssl_x64-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug