Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Bump vcpkg to 2025.02.13 with arm support #19546

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,19 @@ 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

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
Expand Down Expand Up @@ -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"
Expand All @@ -128,12 +133,12 @@ jobs:
- uses: hendrikmuhs/[email protected]
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"
Expand All @@ -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

Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/build-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,29 @@ 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
with:
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
Expand Down Expand Up @@ -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
7 changes: 7 additions & 0 deletions cmake_modules/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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:")
Expand Down
34 changes: 16 additions & 18 deletions plugins/mongodb/mongodbembed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <cstdint>

#include "mongocxx/options/client.hpp"
#include "mongocxx/stdx.hpp"
#include "mongocxx/cursor.hpp"
#include "bsoncxx/json.hpp"
#include "bsoncxx/builder/stream/helpers.hpp"
Expand All @@ -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"
Expand Down Expand Up @@ -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}));
}

/**
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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()))}));
}

/**
Expand All @@ -863,7 +861,7 @@ namespace mongodbembed
bsoncxx::stdx::string_view) noexcept {}
};

auto instance = bsoncxx::stdx::make_unique<mongocxx::instance>(bsoncxx::stdx::make_unique<noop_logger>());
auto instance = std::make_unique<mongocxx::instance>(std::make_unique<noop_logger>());

MongoDBConnection::createInstance().configure(std::move(instance));
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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)]);
}
Expand Down Expand Up @@ -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);
Expand All @@ -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.");
Expand Down
24 changes: 24 additions & 0 deletions system/jlib/jtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion system/xmllib/libxslt_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ CLibXslProcessor::CLibXslProcessor()
xmlInitParser();

xmlSubstituteEntitiesDefault(1);
xmlThrDefSaveNoEmptyTags(1);
xmlSaveNoEmptyTags = 1;
xmlLoadExtDtdDefaultValue = 1;
xsltMaxDepth = 100000;
xsltSetLoaderFunc(NULL);
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 2707 files
2 changes: 1 addition & 1 deletion vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg",
"baseline": "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c"
"baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf"
},
"registries": [],
"overlay-ports": [
Expand Down
Loading