Skip to content

Commit

Permalink
Support building shared libraries (#750)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Feb 12, 2024
1 parent 6cf16c5 commit 8a54b7f
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,34 @@ jobs:
fail-fast: false
matrix:
platform:
# TODO: Enable shared libraries too
- os: macos-latest
cc: clang
cxx: clang++
type: static
- os: macos-latest
cc: clang
cxx: clang++
type: shared
- os: ubuntu-latest
cc: clang
cxx: clang++
type: static
- os: ubuntu-latest
cc: gcc
cxx: g++
type: static
- os: ubuntu-latest
cc: clang
cxx: clang++
type: shared
- os: ubuntu-latest
cc: gcc
cxx: g++
type: shared
- os: windows-latest
type: static
- os: windows-latest
type: shared

# Sanitizers
- os: ubuntu-latest
Expand Down Expand Up @@ -63,6 +80,7 @@ jobs:

- run: cmake --version
- name: Configure JSON BinPack (static)
if: matrix.platform.type == 'static'
run: >
cmake -S . -B ./build
-DCMAKE_BUILD_TYPE:STRING=Release
Expand All @@ -75,6 +93,21 @@ jobs:
-DBUILD_SHARED_LIBS:BOOL=OFF
-DCMAKE_COMPILE_WARNING_AS_ERROR:BOOL=ON
${{ matrix.platform.options }}
- name: Configure JSON BinPack (shared)
if: matrix.platform.type == 'shared'
run: >
cmake -S . -B ./build
-DCMAKE_BUILD_TYPE:STRING=Release
-DJSONBINPACK_CLI:BOOL=ON
-DJSONBINPACK_RUNTIME:BOOL=ON
-DJSONBINPACK_COMPILER:BOOL=ON
-DJSONBINPACK_TESTS:BOOL=ON
-DJSONBINPACK_WEBSITE:BOOL=OFF
-DJSONBINPACK_DOCS:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_COMPILE_WARNING_AS_ERROR:BOOL=ON
${{ matrix.platform.options }}
- run: cmake --build ./build --config Release --target clang_format_test
- run: cmake --build ./build --config Release --parallel 4
- run: >
Expand Down

0 comments on commit 8a54b7f

Please sign in to comment.