Browse Source

feat: adapted the CI changes rel. with static openssl 3 and UNITY_BUILD to GitHub workflows

Sergey Nikolaev 1 year ago
parent
commit
cd6dfd149f

+ 8 - 2
.github/workflows/build_template.yml

@@ -23,6 +23,10 @@ on:
         required: false
         type: number
         default: 0
+      UNITY_BUILD:
+        required: false
+        type: number
+        default: 1
       cmake_command:
         required: false
         type: string
@@ -63,7 +67,7 @@ jobs:
         shell: bash
     timeout-minutes: 30
     container:
-      image: manticoresearch/external_toolchain:clang16_cmake3263
+      image: manticoresearch/external_toolchain:vcpkg331_20250114
       env:
         CACHEB: "../cache"
         DIAGNOSTIC: 1
@@ -76,6 +80,7 @@ jobs:
         CTEST_CMAKE_GENERATOR: ${{ inputs.CTEST_CMAKE_GENERATOR }}
         CTEST_CONFIGURATION_TYPE: ${{ inputs.CTEST_CONFIGURATION_TYPE }}
         WITH_COVERAGE: ${{ inputs.WITH_COVERAGE }}
+        UNITY_BUILD: ${{ inputs.UNITY_BUILD }}
         SYSROOT_URL: https://repo.manticoresearch.com/repository/sysroots
         HOMEBREW_PREFIX: ${{ inputs.HOMEBREW_PREFIX }}
         PACK_GALERA: ${{ inputs.PACK_GALERA }}
@@ -106,7 +111,8 @@ jobs:
           key: ${{ inputs.cache_key }}
 
       - name: 🚀 Build
-        run: ${{ inputs.cmake_command }}
+        run: |
+          ${{ inputs.cmake_command }}
 
       - name: Upload build artifacts
         if: success()

+ 4 - 0
.github/workflows/pack_publish.yml

@@ -87,6 +87,7 @@ jobs:
         mkdir build
         cd build
         cmake -DPACK=1 ..
+        export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
         cmake --build . --target package
       cache_key: pack_${{ matrix.DISTR }}_${{ matrix.arch }}
       artifact_list: "build/manticore*deb"
@@ -110,6 +111,7 @@ jobs:
         mkdir build
         cd build
         cmake -DPACK=1 ..
+        export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
         cmake --build . --target package
       cache_key: pack_${{ matrix.DISTR }}_${{ matrix.arch }}
       artifact_list: "build/manticore*rpm"
@@ -131,6 +133,7 @@ jobs:
         mkdir build
         cd build
         cmake -DPACK=1 ..
+        export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/osx.cmake
         cmake --build . --target package
       cache_key: pack_${{ matrix.DISTR }}_${{ matrix.arch }}
       artifact_list: "build/manticore*tar.gz"
@@ -148,6 +151,7 @@ jobs:
         mkdir build
         cd build
         cmake -DPACK=1 ..
+        export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/windows.cmake
         cmake --build . --target package
       cache_key: pack_windows_x64
       artifact_list: "build/manticore*exe build/manticore*zip"

+ 17 - 2
.github/workflows/test.yml

@@ -99,6 +99,9 @@ jobs:
     with:
       CTEST_CONFIGURATION_TYPE: "Debug"
       artifact_name: debug_build
+      cmake_command: |
+        export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
+        ctest -VV -S misc/ctest/gltest.cmake --no-compress-output
 
   test_linux_debug:
     if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
@@ -245,6 +248,9 @@ jobs:
     uses: ./.github/workflows/build_template.yml
     with:
       artifact_name: release_build
+      cmake_command: |
+        export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
+        ctest -VV -S misc/ctest/gltest.cmake --no-compress-output
 
   test_linux_release:
     if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
@@ -441,6 +447,7 @@ jobs:
         mkdir build
         cd build
         cmake -DPACK=1 ..
+        export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
         cmake --build . --target package
       cache_key: pack_jammy_x86_64
       artifact_list: "build/manticore*deb"
@@ -547,7 +554,11 @@ jobs:
     uses: ./.github/workflows/build_template.yml
     with:
       arch: aarch64
-      cmake_command: mkdir build && cd build && ctest -VV -S ../misc/ctest/justbuild.cmake -DCTEST_SOURCE_DIRECTORY=.. --no-compress-output
+      cmake_command: |
+        mkdir build
+        cd build
+        export CMAKE_TOOLCHAIN_FILE=$(pwd)/../dist/build_dockers/cross/linux.cmake
+        ctest -VV -S ../misc/ctest/justbuild.cmake -DCTEST_SOURCE_DIRECTORY=.. --no-compress-output
       cache_key: build_jammy_aarch64
 
   build_freebsd:
@@ -558,7 +569,11 @@ jobs:
     with:
       DISTR: freebsd13
       boost_url_key: none
-      cmake_command: mkdir build && cd build && ctest -VV -S ../misc/ctest/justbuild.cmake -DCTEST_SOURCE_DIRECTORY=.. --no-compress-output
+      cmake_command: |
+        mkdir build
+        cd build
+        export CMAKE_TOOLCHAIN_FILE=$(pwd)/../dist/build_dockers/cross/freebsd.cmake
+        ctest -VV -S ../misc/ctest/justbuild.cmake -DCTEST_SOURCE_DIRECTORY=.. --no-compress-output
       cache_key: build_freebsd_x86_64
 
   build_windows:

+ 7 - 1
.github/workflows/test_template.yml

@@ -15,6 +15,10 @@ on:
         required: false
         type: number
         default: 999999
+      UNITY_BUILD:
+        required: false
+        type: number
+        default: 1
       artifact_name:
         required: true
         type: string
@@ -51,6 +55,7 @@ jobs:
         # CTEST_REGEX: test_234
         WITH_COVERAGE: ${{ inputs.WITH_COVERAGE }}
         LIBS_BUNDLE:
+        UNITY_BUILD: ${{ inputs.UNITY_BUILD }}
     steps:
       - name: Checkout repository
         uses: actions/checkout@v3
@@ -77,7 +82,8 @@ jobs:
       - name: 🚀 Test
         id: test
         # --timeout may be not working https://gitlab.kitware.com/cmake/cmake/-/issues/23979
-        run: ctest -V -S misc/ctest/gltest.cmake --no-compress-output --timeout 600
+        run: |
+          ctest -VV -S misc/ctest/gltest.cmake --no-compress-output --timeout 600
         continue-on-error: true
 
       - name: List build files

+ 2 - 2
dist/build_dockers/cross/external_toolchain/Dockerfile

@@ -63,9 +63,9 @@ ADD entry_point.sh /sysroot/root/
 ENTRYPOINT ["bash", "/sysroot/root/entry_point.sh"]
 CMD []
 
-# docker buildx create --name manticore_build --platform linux/amd64,linux/arm64
+# docker buildx create --name manticore_build --platform linux/amd64
 # docker buildx use manticore_build
-# docker buildx build --platform linux/amd64,linux/arm64 --push -t manticoresearch/external_toolchain:clang16_cmake3263 .
+# docker buildx build --platform linux/amd64 --push -t manticoresearch/external_toolchain:vcpkg331_20250114 .
 
 # deprecated:
 # on amd: