Skip to content

chore: Use ninja for builds. #44

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

Merged
merged 9 commits into from
May 8, 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
2 changes: 2 additions & 0 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ inputs:
runs:
using: composite
steps:
- name: Install Ninja
uses: ./.github/actions/install-ninja
- name: Install boost
uses: ./.github/actions/install-boost
id: install-boost
Expand Down
23 changes: 23 additions & 0 deletions .github/actions/install-ninja/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Install Ninja
description: 'Install the Ninja build system.'

runs:
using: composite
steps:
- name: Install for Ubuntu.
if: runner.os == 'Linux'
id: install-ninja-ubuntu
shell: bash
run: sudo apt install ninja-build

- name: Install for Mac
if: runner.os == 'macOS'
id: install-ninja-mac
shell: bash
run: brew install ninja

- name: Install for Windows
if: runner.os == 'Windows'
id: install-ninja-windows
shell: pwsh
run: choco install ninja
1 change: 1 addition & 0 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- uses: ./.github/actions/ci
env:
OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }}
Expand Down
2 changes: 1 addition & 1 deletion libs/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endif ()
# Needed to fetch external dependencies.
include(FetchContent)

set(OPENSSL_USE_STATIC_LIBS OFF)
set(OPENSSL_USE_STATIC_LIBS ON)
set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/[email protected]")
find_package(OpenSSL REQUIRED)
message(STATUS "LaunchDarkly: using OpenSSL v${OPENSSL_VERSION}")
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ cd build
# script ends.
trap cleanup EXIT

cmake -D BUILD_TESTING="$2" ..
cmake -G Ninja -D BUILD_TESTING="$2" ..

cmake --build . --target "$1"