Skip to content

Commit

Permalink
Separate lib, samples and tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ttldtor committed Dec 6, 2023
1 parent e2533be commit 797db49
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,39 +78,39 @@ jobs:
- name: Configure CMake (Win::Lib)
if: ${{ contains(matrix.os, 'windows') }}
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-${{matrix.buildType}}" -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-${{matrix.buildType}}" -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF

- name: Configure CMake (Win::Samples & Tools)
if: ${{ contains(matrix.os, 'windows') && !contains(matrix.buildType, 'Deb') }}
run: |
cmake -B ${{github.workspace}}/build-Samples -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-Samples" -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -B ${{github.workspace}}/build-Tools -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-Tools" -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
cmake -B ${{github.workspace}}/build-Samples -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-Samples" -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -B ${{github.workspace}}/build-Tools -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-Tools" -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
- name: Configure CMake (MacOS::Lib)
if: ${{ contains(matrix.os, 'macos') }}
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-${{matrix.buildType}} -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-${{matrix.buildType}} -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF

- name: Configure CMake (MacOS::Samples & Tools)
if: ${{ contains(matrix.os, 'macos') && !contains(matrix.buildType, 'Deb') }}
run: |
cmake -B ${{github.workspace}}/build-Samples -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Samples -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -B ${{github.workspace}}/build-Tools -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Tools -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
cmake -B ${{github.workspace}}/build-Samples -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Samples -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -B ${{github.workspace}}/build-Tools -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Tools -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
- name: Configure CMake (Ubuntu::Lib)
env:
CC: gcc-${{env.GCC_VERSION}}
CXX: g++-${{env.GCC_VERSION}}
if: ${{ contains(matrix.os, 'ubuntu') }}
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-${{matrix.buildType}} -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-${{matrix.buildType}} -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF

- name: Configure CMake (Ubuntu::Samples & Tools)
env:
CC: gcc-${{env.GCC_VERSION}}
CXX: g++-${{env.GCC_VERSION}}
if: ${{ contains(matrix.os, 'ubuntu') && !contains(matrix.buildType, 'Deb') }}
run: |
cmake -B ${{github.workspace}}/build-Samples -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Samples -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -B ${{github.workspace}}/build-Tools -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Tools -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
cmake -B ${{github.workspace}}/build-Samples -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Samples -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -B ${{github.workspace}}/build-Tools -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Tools -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
- name: Build (Lib)
run: cmake --build ${{github.workspace}}/build-${{matrix.buildType}} --config ${{matrix.buildType}}
Expand Down
8 changes: 4 additions & 4 deletions scripts/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set CURRENT_BUILD_TYPE=Release
set BUILD_DIR=%CUR_DIR%\build-win-%CURRENT_BUILD_TYPE%
rmdir "%BUILD_DIR%" /s /q
mkdir "%BUILD_DIR%"
cmake -G "Ninja" -B "%BUILD_DIR%" -DCMAKE_BUILD_TYPE=%CURRENT_BUILD_TYPE% -DDXFCXX_PACKAGE_SUFFIX=-%CURRENT_BUILD_TYPE% -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -G "Ninja" -B "%BUILD_DIR%" -DCMAKE_BUILD_TYPE=%CURRENT_BUILD_TYPE% -DDXFCXX_PACKAGE_SUFFIX=-%CURRENT_BUILD_TYPE% -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake --build "%BUILD_DIR%" --config %CURRENT_BUILD_TYPE% --parallel 8
cd "%BUILD_DIR%"
cpack -G ZIP -C %CURRENT_BUILD_TYPE% --config dxFeedGraalCxxApiPackConfig.cmake
Expand All @@ -17,7 +17,7 @@ set CURRENT_BUILD_TYPE=Debug
set BUILD_DIR=%CUR_DIR%\build-win-%CURRENT_BUILD_TYPE%
rmdir "%BUILD_DIR%" /s /q
mkdir "%BUILD_DIR%"
cmake -G "Ninja" -B "%BUILD_DIR%" -DCMAKE_BUILD_TYPE=%CURRENT_BUILD_TYPE% -DDXFCXX_PACKAGE_SUFFIX=-%CURRENT_BUILD_TYPE% -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -G "Ninja" -B "%BUILD_DIR%" -DCMAKE_BUILD_TYPE=%CURRENT_BUILD_TYPE% -DDXFCXX_PACKAGE_SUFFIX=-%CURRENT_BUILD_TYPE% -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake --build "%BUILD_DIR%" --config %CURRENT_BUILD_TYPE% --parallel 8
cd "%BUILD_DIR%"
cpack -G ZIP -C %CURRENT_BUILD_TYPE% --config dxFeedGraalCxxApiPackConfig.cmake
Expand All @@ -27,7 +27,7 @@ set CURRENT_BUILD_TYPE=Release
set BUILD_DIR=%CUR_DIR%\build-win-Samples
rmdir "%BUILD_DIR%" /s /q
mkdir "%BUILD_DIR%"
cmake -G "Ninja" -B "%BUILD_DIR%" -DCMAKE_BUILD_TYPE=%CURRENT_BUILD_TYPE% -DDXFCXX_PACKAGE_SUFFIX=-Samples -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -G "Ninja" -B "%BUILD_DIR%" -DCMAKE_BUILD_TYPE=%CURRENT_BUILD_TYPE% -DDXFCXX_PACKAGE_SUFFIX=-Samples -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake --build "%BUILD_DIR%" --config %CURRENT_BUILD_TYPE% --parallel 8
cd "%BUILD_DIR%"
cpack -G ZIP -C %CURRENT_BUILD_TYPE% --config dxFeedGraalCxxApiPackConfig.cmake
Expand All @@ -37,7 +37,7 @@ set CURRENT_BUILD_TYPE=Release
set BUILD_DIR=%CUR_DIR%\build-win-Tools
rmdir "%BUILD_DIR%" /s /q
mkdir "%BUILD_DIR%"
cmake -G "Ninja" -B "%BUILD_DIR%" -DCMAKE_BUILD_TYPE=%CURRENT_BUILD_TYPE% -DDXFCXX_PACKAGE_SUFFIX=-Tools -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
cmake -G "Ninja" -B "%BUILD_DIR%" -DCMAKE_BUILD_TYPE=%CURRENT_BUILD_TYPE% -DDXFCXX_PACKAGE_SUFFIX=-Tools -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
cmake --build "%BUILD_DIR%" --config %CURRENT_BUILD_TYPE% --parallel 8
cd "%BUILD_DIR%"
cpack -G ZIP -C %CURRENT_BUILD_TYPE% --config dxFeedGraalCxxApiPackConfig.cmake
Expand Down
9 changes: 5 additions & 4 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ echo "--- $TAG ---"

if [ ! -d "$DIST_DIR" ]; then mkdir "$DIST_DIR"; fi

set -- "Release" "Debug" "RelWithDebInfo" "MinSizeRel"
# set -- "Release" "Debug" "RelWithDebInfo" "MinSizeRel"
set -- "Release" "Debug"

for BUILD_TYPE in "$@"
do
Expand All @@ -17,7 +18,7 @@ do
echo "--- $BUILD_TYPE ---" &&
echo "--- Removing old bundles ---" && find "$DIST_DIR" -maxdepth 1 -name "$TAG*$BUILD_TYPE.zip" -print0 | xargs -0 rm -f &&
mkdir "$BUILD_DIR" &&
echo "--- Configuring CMake ---" && cmake -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDXFCXX_VERSION="$TAG" -DDXFCXX_PACKAGE_SUFFIX=-$BUILD_TYPE -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF &&
echo "--- Configuring CMake ---" && cmake -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDXFCXX_VERSION="$TAG" -DDXFCXX_PACKAGE_SUFFIX=-$BUILD_TYPE -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF &&
echo "--- Building ---" && cmake --build "$BUILD_DIR" --config $BUILD_TYPE --parallel 8 &&
cd "$BUILD_DIR" &&
echo "--- Packing ---" && cpack -G ZIP -C $BUILD_TYPE --config ./dxFeedGraalCxxApiPackConfig.cmake &&
Expand All @@ -33,7 +34,7 @@ if [ -d "$BUILD_DIR" ]; then rm -Rf "$BUILD_DIR"; fi &&
echo "--- $COMPONENT ---" &&
echo "--- Removing old bundles ---" && find "$DIST_DIR" -maxdepth 1 -name "$TAG*$COMPONENT.zip" -print0 | xargs -0 rm -f &&
mkdir "$BUILD_DIR" &&
echo "--- Configuring CMake ---" && cmake -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDXFCXX_VERSION="$TAG" -DDXFCXX_PACKAGE_SUFFIX=-$COMPONENT -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF &&
echo "--- Configuring CMake ---" && cmake -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDXFCXX_VERSION="$TAG" -DDXFCXX_PACKAGE_SUFFIX=-$COMPONENT -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF &&
echo "--- Building ---" && cmake --build "$BUILD_DIR" --config $BUILD_TYPE --parallel 8 &&
cd "$BUILD_DIR" &&
echo "--- Packing ---" && cpack -G ZIP -C $BUILD_TYPE --config ./dxFeedGraalCxxApiPackConfig.cmake &&
Expand All @@ -47,7 +48,7 @@ if [ -d "$BUILD_DIR" ]; then rm -Rf "$BUILD_DIR"; fi &&
echo "--- $COMPONENT ---" &&
echo "--- Removing old bundles ---" && find "$DIST_DIR" -maxdepth 1 -name "$TAG*$COMPONENT.zip" -print0 | xargs -0 rm -f &&
mkdir "$BUILD_DIR" &&
echo "--- Configuring CMake ---" && cmake -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDXFCXX_VERSION="$TAG" -DDXFCXX_PACKAGE_SUFFIX=-$COMPONENT -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF &&
echo "--- Configuring CMake ---" && cmake -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDXFCXX_VERSION="$TAG" -DDXFCXX_PACKAGE_SUFFIX=-$COMPONENT -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF &&
echo "--- Building ---" && cmake --build "$BUILD_DIR" --config $BUILD_TYPE --parallel 8 &&
cd "$BUILD_DIR" &&
echo "--- Packing ---" && cpack -G ZIP -C $BUILD_TYPE --config ./dxFeedGraalCxxApiPackConfig.cmake &&
Expand Down

0 comments on commit 797db49

Please sign in to comment.