Skip to content

Commit 7a51ffa

Browse files
authored
chore: Use ninja for builds. (#44)
1 parent a4f2d63 commit 7a51ffa

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

.github/actions/ci/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ inputs:
2323
runs:
2424
using: composite
2525
steps:
26+
- name: Install Ninja
27+
uses: ./.github/actions/install-ninja
2628
- name: Install boost
2729
uses: ./.github/actions/install-boost
2830
id: install-boost
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Install Ninja
2+
description: 'Install the Ninja build system.'
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Install for Ubuntu.
8+
if: runner.os == 'Linux'
9+
id: install-ninja-ubuntu
10+
shell: bash
11+
run: sudo apt install ninja-build
12+
13+
- name: Install for Mac
14+
if: runner.os == 'macOS'
15+
id: install-ninja-mac
16+
shell: bash
17+
run: brew install ninja
18+
19+
- name: Install for Windows
20+
if: runner.os == 'Windows'
21+
id: install-ninja-windows
22+
shell: pwsh
23+
run: choco install ninja

.github/workflows/client.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
runs-on: windows-2022
3737
steps:
3838
- uses: actions/checkout@v3
39+
- uses: ilammy/msvc-dev-cmd@v1
3940
- uses: ./.github/actions/ci
4041
env:
4142
OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }}

libs/common/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ endif ()
2424
# Needed to fetch external dependencies.
2525
include(FetchContent)
2626

27-
set(OPENSSL_USE_STATIC_LIBS OFF)
27+
set(OPENSSL_USE_STATIC_LIBS ON)
2828
set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/[email protected]")
2929
find_package(OpenSSL REQUIRED)
3030
message(STATUS "LaunchDarkly: using OpenSSL v${OPENSSL_VERSION}")

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ cd build
1717
# script ends.
1818
trap cleanup EXIT
1919

20-
cmake -D BUILD_TESTING="$2" ..
20+
cmake -G Ninja -D BUILD_TESTING="$2" ..
2121

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

0 commit comments

Comments
 (0)