-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: install libfido2 from brew on osx
`brew` has for some time packaged libfido2. We can use those builds to simplify our pipeline. Ensure linking to the same OpenSSL version as libfido2 through `brew deps`.
- Loading branch information
Showing
2 changed files
with
10 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
- name: dependencies | ||
run: brew install check cmake help2man mandoc [email protected] pkg-config automake | ||
run: brew install check cmake help2man libfido2 mandoc pkg-config automake | ||
- name: build | ||
env: | ||
CC: ${{ matrix.cc }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
BUILDROOT="$(git rev-parse --show-toplevel)" | ||
|
||
pushd "/tmp" &>/dev/null | ||
# Build and install libcbor | ||
git clone https://github.com/pjk/libcbor | ||
pushd "/tmp/libcbor" &>/dev/null | ||
git checkout v0.5.0 | ||
cmake -Bbuild -H. | ||
cmake --build build -- --jobs=2 VERBOSE=1 | ||
sudo make -j $(sysctl -n hw.logicalcpu) -C build install | ||
popd &>/dev/null | ||
|
||
# Build and install libfido2 | ||
export PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig | ||
git clone https://github.com/Yubico/libfido2 | ||
pushd "/tmp/libfido2" &>/dev/null | ||
cmake -Bbuild -H. | ||
cmake --build build -- --jobs=2 VERBOSE=1 | ||
sudo make -j $(sysctl -n hw.logicalcpu) -C build install | ||
popd &>/dev/null | ||
popd &>/dev/null | ||
|
||
pushd "$BUILDROOT" &>/dev/null | ||
./autogen.sh | ||
./configure --disable-silent-rules --disable-man | ||
make -j $(sysctl -n hw.logicalcpu) | ||
popd &>/dev/null | ||
# Link to same OpenSSL version as libfido2. | ||
OPENSSL="$(brew deps --installed libfido2 | grep openssl)" | ||
LIBFIDO2_PKGCONF="$(brew --prefix libfido2)/lib/pkgconfig" | ||
OPENSSL_PKGCONF="$(brew --prefix "${OPENSSL}")/lib/pkgconfig" | ||
export PKG_CONFIG_PATH="${LIBFIDO2_PKGCONF}:${OPENSSL_PKGCONF}" | ||
|
||
./autogen.sh | ||
./configure --disable-silent-rules --disable-man | ||
make -j $(sysctl -n hw.logicalcpu) |