-
Notifications
You must be signed in to change notification settings - Fork 99
91 lines (72 loc) · 2.9 KB
/
macos_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
name: MacOS Build
# This workflow is triggered on pushes to the repository.
on: [push]
jobs:
job1:
name: MacOS
runs-on: macos-latest
steps:
# This action checks-out the repository under $GITHUB_WORKSPACE, so the workflow can access it.
- name: checkout
uses: actions/checkout@v4
- name: Install prerequisites
run: |
set -x
brew update
brew install check gengetopt help2man opensc zlib
brew reinstall openssl@3
- name: Build and install
run: |
set -x
mkdir build
cd build
cmake .. -DVERBOSE_CMAKE=ON -DOPENSSL_PKG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig
make
make test
otool -L tool/yubico-piv-tool | grep libcrypto
otool -L lib/libykpiv.dylib | grep libcrypto
otool -L ykcs11/libykcs11.dylib | grep libcrypto
sudo make install
yubico-piv-tool --help | grep "Usage: yubico-piv-tool"
objdump --syms /usr/local/lib/libykcs11.dylib | grep C_Sign
pkcs11-tool --module /usr/local/lib/libykcs11.dylib --show-info | grep Yubico
- name: Build using OpenSSL static link
run: |
set -x
export PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig:PKG_CONFIG_PATH
rm -rf build; mkdir build; cd build
cmake .. -DVERBOSE_CMAKE=ON -DOPENSSL_STATIC_LINK=ON -DBACKEND=macscard
make
make test
otool -L tool/yubico-piv-tool | grep libcrypto | wc -l | grep 0
otool -L lib/libykpiv.dylib | grep libcrypto | wc -l | grep 0
otool -L ykcs11/libykcs11.dylib | grep libcrypto | wc -l | grep 0
sudo make install
yubico-piv-tool --help | grep "Usage: yubico-piv-tool"
pkcs11-tool --module /usr/local/lib/libykcs11.dylib --show-info | grep Yubico
- name: Build with YKCS11_DBG is set
run: |
set -x
export PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig:PKG_CONFIG_PATH
rm -rf build; mkdir build; cd build
cmake .. -DVERBOSE_CMAKE=ON -DYKCS11_DBG=3
make
make test
otool -L ykcs11/libykcs11.dylib | grep libcrypto
pkcs11-tool --module ykcs11/libykcs11.dylib --show-info | grep Yubico
- name: Build only library (no CLI and no ykcs11)
run: |
set -x
export PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig:PKG_CONFIG_PATH
rm -rf build; mkdir build; cd build
cmake .. -DVERBOSE_CMAKE=ON -DBUILD_ONLY_LIB=ON
make
make test
- name: Build only dynamic libaries
run: |
set -x
export PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig:PKG_CONFIG_PATH
rm -rf build; mkdir build; cd build
cmake .. -DVERBOSE_CMAKE=ON -DBUILD_STATIC_LIB=OFF
make
make test