diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 68664dfb99d..51aaf2fbac0 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -58,6 +58,11 @@ on: description: 'Asset Name (if upload-package is true)' required: false default: 'build-docker-package' + tag_postfix: + type: string + description: 'Either -arm or empty string' + required: false + default: '' secrets: LNB_TOKEN: required: false @@ -65,7 +70,7 @@ on: jobs: build-docker: - runs-on: ubuntu-22.04 + runs-on: ubuntu-22.04${{ inputs.tag_postfix }} steps: - name: Free additional disk space (remove Android SDK + Tools) continue-on-error: true @@ -112,7 +117,7 @@ jobs: vcpkg_sha_short=$(git rev-parse --short=8 HEAD) echo "vcpkg_sha_short=$vcpkg_sha_short" >> $GITHUB_OUTPUT docker_build_label=hpccsystems/platform-build-base-${{ inputs.os }} - echo "docker_tag=$docker_build_label:$vcpkg_sha_short" >> $GITHUB_OUTPUT + echo "docker_tag=$docker_build_label:$vcpkg_sha_short${{ inputs.tag_postfix }}" >> $GITHUB_OUTPUT - name: Print vars shell: "bash" @@ -128,12 +133,12 @@ jobs: - uses: hendrikmuhs/ccache-action@v1.2 with: save: ${{ inputs.update-cache == true }} - key: docker-${{ inputs.os }}-${{ inputs.build-type }}-${{ steps.vars.outputs.branch_label }}-${{ inputs.containerized == true && 'k8s' || 'bare-metal' }}-${{ inputs.ln == true && 'LN' || 'HPCC-Platform' }} + key: docker${{ inputs.tag_postfix }}-${{ inputs.os }}-${{ inputs.build-type }}-${{ steps.vars.outputs.branch_label }}-${{ inputs.containerized == true && 'k8s' || 'bare-metal' }}-${{ inputs.ln == true && 'LN' || 'HPCC-Platform' }} restore-keys: | - docker-${{ inputs.os }}-${{ inputs.build-type }}-${{ steps.vars.outputs.branch_label }}-${{ inputs.containerized == true && 'k8s' || 'bare-metal' }}- - docker-${{ inputs.os }}-${{ inputs.build-type }}-${{ steps.vars.outputs.branch_label }}- - docker-${{ inputs.os }}-${{ inputs.build-type }}- - docker-${{ inputs.os }}- + docker${{ inputs.tag_postfix }}-${{ inputs.os }}-${{ inputs.build-type }}-${{ steps.vars.outputs.branch_label }}-${{ inputs.containerized == true && 'k8s' || 'bare-metal' }}- + docker${{ inputs.tag_postfix }}-${{ inputs.os }}-${{ inputs.build-type }}-${{ steps.vars.outputs.branch_label }}- + docker${{ inputs.tag_postfix }}-${{ inputs.os }}-${{ inputs.build-type }}- + docker${{ inputs.tag_postfix }}-${{ inputs.os }}- - name: CMake Configure and Build shell: "bash" @@ -152,7 +157,7 @@ jobs: --mount source="${{ github.workspace }}/build",target=/hpcc-dev/build,type=bind,consistency=delegated \ --mount source="${{ github.workspace }}/.ccache",target=/root/.ccache,type=bind,consistency=delegated \ ${{ steps.vars.outputs.docker_tag }} "\ - cmake -G Ninja -S /hpcc-dev/${{ inputs.ln == true && 'LN' || 'HPCC-Platform' }} -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DVCPKG_FILES_DIR=/hpcc-dev -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DCONTAINERIZED=${{ inputs.containerized == true && 'ON' || 'OFF' }} -DCPACK_STRIP_FILES=${{ inputs.strip-files == true && 'ON' || 'OFF' }} ${{ inputs.single-package == true && '-DINCLUDE_PLUGINS=ON' || '-D$plugin=ON' }} ${{ inputs.cmake-configuration }} ${{ inputs.cmake-configuration-ex }} && \ + cmake -G Ninja -S /hpcc-dev/${{ inputs.ln == true && 'LN' || 'HPCC-Platform' }} -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DCONTAINERIZED=${{ inputs.containerized == true && 'ON' || 'OFF' }} -DCPACK_STRIP_FILES=${{ inputs.strip-files == true && 'ON' || 'OFF' }} ${{ inputs.single-package == true && '-DINCLUDE_PLUGINS=ON' || '-D$plugin=ON' }} ${{ inputs.cmake-configuration }} ${{ inputs.cmake-configuration-ex }} && \ cmake --build /hpcc-dev/build --parallel ${{ inputs.upload-package == true && '--target package' || ''}}" done diff --git a/.github/workflows/build-vcpkg.yml b/.github/workflows/build-vcpkg.yml index 0beea3e430e..690aa6d8aa0 100644 --- a/.github/workflows/build-vcpkg.yml +++ b/.github/workflows/build-vcpkg.yml @@ -64,6 +64,14 @@ jobs: asset-name: 'docker-package' secrets: inherit + build-docker-ubuntu-24_04-arm: + if: ${{ contains('pull_request,push', github.event_name) }} + uses: ./.github/workflows/build-docker.yml + with: + os: ubuntu-24.04 + tag_postfix: "-arm" + secrets: inherit + build-docker-ubuntu-24_04: if: ${{ contains('pull_request,push', github.event_name) }} uses: ./.github/workflows/build-docker.yml @@ -71,6 +79,14 @@ jobs: os: ubuntu-24.04 secrets: inherit + build-docker-ubuntu-22_04-arm: + if: ${{ contains('pull_request,push', github.event_name) }} + uses: ./.github/workflows/build-docker.yml + with: + os: ubuntu-22.04 + tag_postfix: "-arm" + secrets: inherit + build-docker-ubuntu-22_04: if: ${{ contains('pull_request,push', github.event_name) }} uses: ./.github/workflows/build-docker.yml @@ -214,3 +230,12 @@ jobs: build-type: 'Release' cmake-configuration-ex: '-DUSE_CPPUNIT=OFF -DCLIENTTOOLS_ONLY=ON -DINCLUDE_PLUGINS=OFF -DUSE_AZURE=OFF -DUSE_CASSANDRA=OFF -DSUPPRESS_CASSANDRAEMBED=ON -DUSE_JAVA=OFF -DUSE_OPENLDAP=OFF' secrets: inherit + + build-gh_runner-macos-14: + if: ${{ contains('pull_request,push', github.event_name) }} + uses: ./.github/workflows/build-gh_runner.yml + with: + os: macos-14 + build-type: 'Release' + cmake-configuration-ex: '-DCMAKE_OSX_ARCHITECTURES=arm64 -DUSE_CPPUNIT=OFF -DCLIENTTOOLS_ONLY=ON -DINCLUDE_PLUGINS=OFF -DUSE_AZURE=OFF -DUSE_CASSANDRA=OFF -DSUPPRESS_CASSANDRAEMBED=ON -DUSE_JAVA=OFF -DUSE_OPENLDAP=OFF' + secrets: inherit diff --git a/cmake_modules/vcpkg.cmake b/cmake_modules/vcpkg.cmake index 9c0466ddedb..a35497ff9bd 100644 --- a/cmake_modules/vcpkg.cmake +++ b/cmake_modules/vcpkg.cmake @@ -19,8 +19,15 @@ elseif(APPLE) set(VCPKG_TARGET_TRIPLET "x64-osx" CACHE STRING "target triplet") endif() elseif(UNIX) + execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE) + string(STRIP ${ARCHITECTURE} ARCHITECTURE) + if(ARCHITECTURE MATCHES "arm" OR ARCHITECTURE MATCHES "aarch64") + set(VCPKG_HOST_TRIPLET "arm64-linux-dynamic" CACHE STRING "host triplet") + set(VCPKG_TARGET_TRIPLET "arm64-linux-dynamic" CACHE STRING "target triplet") + else() set(VCPKG_HOST_TRIPLET "x64-linux-dynamic" CACHE STRING "host triplet") set(VCPKG_TARGET_TRIPLET "x64-linux-dynamic" CACHE STRING "target triplet") + endif() endif() message("-- vcpkg settings:") diff --git a/plugins/mongodb/mongodbembed.cpp b/plugins/mongodb/mongodbembed.cpp index 6333734a8f1..b0b14c8a3f0 100755 --- a/plugins/mongodb/mongodbembed.cpp +++ b/plugins/mongodb/mongodbembed.cpp @@ -27,7 +27,6 @@ #include #include "mongocxx/options/client.hpp" -#include "mongocxx/stdx.hpp" #include "mongocxx/cursor.hpp" #include "bsoncxx/json.hpp" #include "bsoncxx/builder/stream/helpers.hpp" @@ -36,7 +35,6 @@ #include "bsoncxx/builder/stream/array.hpp" #include "bsoncxx/document/value.hpp" #include "bsoncxx/document/view.hpp" -#include "bsoncxx/stdx/make_unique.hpp" #include "bsoncxx/stdx/optional.hpp" #include "bsoncxx/stdx/string_view.hpp" #include "bsoncxx/builder/basic/array.hpp" @@ -465,7 +463,7 @@ namespace mongodbembed size32_t utf8chars; char *utf8; rtlUnicodeToUtf8X(utf8chars, utf8, chars, value); - query->build()->append(kvp(std::string(field->name), bsoncxx::types::b_utf8{utf8})); + query->build()->append(kvp(std::string(field->name), bsoncxx::types::b_string{utf8})); } /** @@ -678,7 +676,7 @@ namespace mongodbembed } /** - * @brief Binds an ECL Data param to a bsoncxx::types::b_utf8 + * @brief Binds an ECL Data param to a bsoncxx::types::b_string * * @param name Name of the parameter. * @param len Length of the value. @@ -786,7 +784,7 @@ namespace mongodbembed } /** - * @brief Binds an ECL String param to a bsoncxx::types::b_utf8. + * @brief Binds an ECL String param to a bsoncxx::types::b_string. * * @param name Name of the parameter. * @param len Number of chars in string. @@ -799,11 +797,11 @@ namespace mongodbembed rtlDataAttr utf8; rtlStrToUtf8X(utf8Chars, utf8.refstr(), len, val); - query->build()->append(kvp(std::string(name), bsoncxx::types::b_utf8{std::string(utf8.getstr(), rtlUtf8Size(utf8Chars, utf8.getdata()))})); + query->build()->append(kvp(std::string(name), bsoncxx::types::b_string{std::string(utf8.getstr(), rtlUtf8Size(utf8Chars, utf8.getdata()))})); } /** - * @brief Binds an ECL VString param to a bsoncxx::types::b_utf8. + * @brief Binds an ECL VString param to a bsoncxx::types::b_string. * * @param name Name of the parameter. * @param val VString value. @@ -815,11 +813,11 @@ namespace mongodbembed rtlDataAttr utf8; rtlStrToUtf8X(utf8Chars, utf8.refstr(), strlen(val), val); - query->build()->append(kvp(std::string(name), bsoncxx::types::b_utf8{std::string(utf8.getstr(), rtlUtf8Size(utf8Chars, utf8.getdata()))})); + query->build()->append(kvp(std::string(name), bsoncxx::types::b_string{std::string(utf8.getstr(), rtlUtf8Size(utf8Chars, utf8.getdata()))})); } /** - * @brief Binds an ECL UTF8 param to a bsoncxx::types::b_utf8. + * @brief Binds an ECL UTF8 param to a bsoncxx::types::b_string. * * @param name Name of the parameter. * @param chars Number of chars in string. @@ -829,11 +827,11 @@ namespace mongodbembed { checkNextParam(name); - query->build()->append(kvp(std::string(name), bsoncxx::types::b_utf8{std::string(val, rtlUtf8Size(chars, val))})); + query->build()->append(kvp(std::string(name), bsoncxx::types::b_string{std::string(val, rtlUtf8Size(chars, val))})); } /** - * @brief Binds an ECL Unicode param to a bsoncxx::types::b_utf8. + * @brief Binds an ECL Unicode param to a bsoncxx::types::b_string. * * @param name Name of the parameter. * @param chars Number of chars in string. @@ -846,7 +844,7 @@ namespace mongodbembed rtlDataAttr utf8; rtlUnicodeToUtf8X(utf8chars, utf8.refstr(), chars, val); - query->build()->append(kvp(std::string(name), bsoncxx::types::b_utf8{std::string(utf8.getstr(), rtlUtf8Size(utf8chars, utf8.getdata()))})); + query->build()->append(kvp(std::string(name), bsoncxx::types::b_string{std::string(utf8.getstr(), rtlUtf8Size(utf8chars, utf8.getdata()))})); } /** @@ -863,7 +861,7 @@ namespace mongodbembed bsoncxx::stdx::string_view) noexcept {} }; - auto instance = bsoncxx::stdx::make_unique(bsoncxx::stdx::make_unique()); + auto instance = std::make_unique(std::make_unique()); MongoDBConnection::createInstance().configure(std::move(instance)); } @@ -1111,7 +1109,7 @@ namespace mongodbembed { builder << param << ele.get_double().value; } - else if (ele.type() == bsoncxx::type::k_utf8) + else if (ele.type() == bsoncxx::type::k_string) { builder << param << ele.get_string().value; } @@ -1147,7 +1145,7 @@ namespace mongodbembed { ctx << ele.get_double().value; } - else if (ele.type() == bsoncxx::type::k_utf8) + else if (ele.type() == bsoncxx::type::k_string) { ctx << ele.get_string().value; } @@ -1196,7 +1194,7 @@ namespace mongodbembed } else { - if (view[key].type() == bsoncxx::type::k_utf8) + if (view[key].type() == bsoncxx::type::k_string) { insertValue(builder, std::string(view[key].get_string().value), view[value.substr(1)]); } @@ -1323,7 +1321,7 @@ namespace mongodbembed } else { - if (view[key].type() == bsoncxx::type::k_utf8) + if (view[key].type() == bsoncxx::type::k_string) { builder << key << open_document << [&](key_context<> ctx) { buildDocument(ctx, view, ++start); @@ -1338,7 +1336,7 @@ namespace mongodbembed { if (!isRsvd) { - if (view[key].type() == bsoncxx::type::k_utf8) + if (view[key].type() == bsoncxx::type::k_string) key = std::string{view[key].get_string().value}; else failx("Key must be type String."); diff --git a/system/jlib/jtrace.cpp b/system/jlib/jtrace.cpp index e91d63d0d9e..e637f0fccec 100644 --- a/system/jlib/jtrace.cpp +++ b/system/jlib/jtrace.cpp @@ -88,6 +88,18 @@ class NoopSpanExporter final : public opentelemetry::sdk::trace::SpanExporter return opentelemetry::sdk::common::ExportResult::kSuccess; } + /** + * Export all spans that have been exported. + * @param timeout an optional timeout, the default timeout means that no + * timeout is applied. + * @return return true when all data are exported, and false when timeout + */ + virtual bool ForceFlush( + std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override + { + return true; + } + /** * Shut down the exporter. NoopSpanExporter does not need to do anything here. * @param timeout an optional timeout. @@ -277,6 +289,18 @@ class JLogSpanExporter final : public opentelemetry::sdk::trace::SpanExporter } } + /** + * Export all spans that have been exported. + * @param timeout an optional timeout, the default timeout means that no + * timeout is applied. + * @return return true when all data are exported, and false when timeout + */ + virtual bool ForceFlush( + std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override + { + return true; + } + /** * Shut down the exporter. * @param timeout an optional timeout. diff --git a/system/xmllib/libxslt_processor.cpp b/system/xmllib/libxslt_processor.cpp index 46fab63f5bc..e2e02f7edb5 100644 --- a/system/xmllib/libxslt_processor.cpp +++ b/system/xmllib/libxslt_processor.cpp @@ -732,7 +732,7 @@ CLibXslProcessor::CLibXslProcessor() xmlInitParser(); xmlSubstituteEntitiesDefault(1); - xmlThrDefSaveNoEmptyTags(1); + xmlSaveNoEmptyTags = 1; xmlLoadExtDtdDefaultValue = 1; xsltMaxDepth = 100000; xsltSetLoaderFunc(NULL); diff --git a/vcpkg b/vcpkg index 376d53ed2f4..9fc9a5f49c9 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 376d53ed2f40080b6c094501f1f06bb57bb153bc +Subproject commit 9fc9a5f49c9a2dbeb8ded29f493b57e2736d28dc diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json index bff4e206ca6..a0d79fa5ef0 100644 --- a/vcpkg-configuration.json +++ b/vcpkg-configuration.json @@ -2,7 +2,7 @@ "default-registry": { "kind": "git", "repository": "https://github.com/microsoft/vcpkg", - "baseline": "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c" + "baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf" }, "registries": [], "overlay-ports": [