Skip to content

Commit

Permalink
ci: Merge static and shared build
Browse files Browse the repository at this point in the history
  • Loading branch information
dr8co committed Apr 28, 2024
1 parent d530060 commit 36dff5e
Showing 1 changed file with 16 additions and 25 deletions.
41 changes: 16 additions & 25 deletions .github/workflows/cpack-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,31 +68,22 @@ jobs:
echo "generator='Ninja'" >> "$GITHUB_OUTPUT"
fi
- name: Configure CMake for Static Build
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }} -G ${{ steps.set-generator.outputs.generator }}
-DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
- name: Build Static Library
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4

- name: Configure CMake for Shared Build
if: matrix.os != 'windows-latest'
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }} -G ${{ steps.set-generator.outputs.generator }}
-DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
- name: Build Shared Library
if: matrix.os != 'windows-latest'
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4
- name: Configure CMake and Build Assets
run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-S ${{ github.workspace }} -G ${{ steps.set-generator.outputs.generator }} \
-DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF && \
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4 && \
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-S ${{ github.workspace }} -G ${{ steps.set-generator.outputs.generator }} \
-DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF && \
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4
- name: Package
working-directory: ${{ steps.strings.outputs.build-output-dir }}
Expand Down

0 comments on commit 36dff5e

Please sign in to comment.