Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: simplify macos build, fix codeql workflow #307

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
schedule:
- cron: '0 8 * * 6'

permissions:
security-events: write

jobs:
CodeQL-Build:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
37 changes: 10 additions & 27 deletions build-aux/ci/build-osx.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
#!/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 the 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)
make check