diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a526f74e0af3..0a3fa431d21b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,23 +94,40 @@ jobs: if-no-files-found: ignore if: success() || failure() - build_libstdcxx: + build_azure_linux: + name: "Azure Linux CI" needs: checks runs-on: [self-hosted, 1ES.Pool=gha-virtual-ccf-sub] container: - image: ghcr.io/microsoft/ccf/ci/default:build-08-10-2024 + image: mcr.microsoft.com/azurelinux/base/core:3.0 options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro + steps: + - name: "Install dependencies" + run: | + set -ex + gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY + tdnf -y update + # Source control + tdnf -y install ca-certificates git + # Build tools + tdnf -y install build-essential clang cmake ninja-build which + # Dependencies + tdnf -y install openssl-devel libuv-devel + # Test dependencies + tdnf -y install libarrow-devel parquet-libs-devel + shell: bash + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: "Build Debug with libstdc++" + - name: "Build Debug" run: | set -ex git config --global --add safe.directory /__w/CCF/CCF mkdir build cd build - cmake -GNinja -DCOMPILE_TARGET=virtual -DCMAKE_BUILD_TYPE=Debug -DLVI_MITIGATIONS=OFF -DUSE_LIBCXX=OFF .. + CC=`which clang` CXX=`which clang++` cmake -GNinja -DCOMPILE_TARGET=virtual -DCMAKE_BUILD_TYPE=Debug -DLVI_MITIGATIONS=OFF -DUSE_LIBCXX=OFF .. ninja shell: bash diff --git a/include/ccf/crypto/base64.h b/include/ccf/crypto/base64.h index f145ee770772..a5b45daf8f6c 100644 --- a/include/ccf/crypto/base64.h +++ b/include/ccf/crypto/base64.h @@ -2,6 +2,7 @@ // Licensed under the Apache 2.0 License. #pragma once +#include #include #include diff --git a/include/ccf/ds/contiguous_set.h b/include/ccf/ds/contiguous_set.h index 754cfc8d26f6..89acb37fefa9 100644 --- a/include/ccf/ds/contiguous_set.h +++ b/include/ccf/ds/contiguous_set.h @@ -447,7 +447,7 @@ namespace ccf::ds bool contains(const T& t) const { - return find_internal(t) != end(); + return find_internal(t) != end().it; } ConstIterator find(const T& t) const diff --git a/include/ccf/ds/json.h b/include/ccf/ds/json.h index 71b9d500282a..c5af93f01f80 100644 --- a/include/ccf/ds/json.h +++ b/include/ccf/ds/json.h @@ -5,6 +5,7 @@ #include "ccf/ds/json_schema.h" #define FMT_HEADER_ONLY +#include #include #include #include diff --git a/include/ccf/pal/attestation.h b/include/ccf/pal/attestation.h index 2cc25bee6939..4ea93ae31fe0 100644 --- a/include/ccf/pal/attestation.h +++ b/include/ccf/pal/attestation.h @@ -201,9 +201,11 @@ namespace ccf::pal const snp::EndorsementsServers& endorsements_servers = {}) { endorsement_cb( - { - .format = QuoteFormat::insecure_virtual, - }, + {.format = QuoteFormat::insecure_virtual, + .quote = {}, + .endorsements = {}, + .uvm_endorsements = {}, + .endorsed_tcb = {}}, {}); } diff --git a/src/ds/test/json_schema.cpp b/src/ds/test/json_schema.cpp index 5fd16ecd9a78..57894bc65bfa 100644 --- a/src/ds/test/json_schema.cpp +++ b/src/ds/test/json_schema.cpp @@ -35,7 +35,7 @@ TEST_CASE("basic macro parser generation") j["c"] = 100; const Bar bar_1 = j; REQUIRE(bar_1.a == j["a"]); - REQUIRE(bar_1.b == j["b"]); + REQUIRE(bar_1.b == j["b"].get()); REQUIRE(bar_1.c == j["c"]); } @@ -89,7 +89,7 @@ TEST_CASE("macro parser generation with base classes") j["e"] = 101; const Baz baz_1 = j; REQUIRE(baz_1.a == j["a"]); - REQUIRE(baz_1.b == j["b"]); + REQUIRE(baz_1.b == j["b"].get()); REQUIRE(baz_1.c == j["c"]); REQUIRE(baz_1.d == j["d"]); REQUIRE(baz_1.e == j["e"]); diff --git a/src/host/ledger.h b/src/host/ledger.h index f5fb4645c0f1..496a25104c36 100644 --- a/src/host/ledger.h +++ b/src/host/ledger.h @@ -1606,14 +1606,16 @@ namespace asynchost job->from_idx = from_idx; job->to_idx = to_idx; job->max_size = max_entries_size; - job->result_cb = - [this, from_idx = from_idx, to_idx = to_idx, purpose = purpose]( - auto&& read_result, int status) { - // NB: Even if status is cancelled (and entry is empty), we - // want to write this result back to the enclave - write_ledger_get_range_response( - from_idx, to_idx, std::move(read_result), purpose); - }; + job->result_cb = [this, + from_idx_ = from_idx, + to_idx_ = to_idx, + purpose_ = + purpose](auto&& read_result, int status) { + // NB: Even if status is cancelled (and entry is empty), we + // want to write this result back to the enclave + write_ledger_get_range_response( + from_idx_, to_idx_, std::move(read_result), purpose_); + }; work_handle->data = job; } diff --git a/src/js/core/context.cpp b/src/js/core/context.cpp index cfd736bb051f..6bd2604ea55d 100644 --- a/src/js/core/context.cpp +++ b/src/js/core/context.cpp @@ -13,6 +13,7 @@ #include "js/global_class_ids.h" #include +#include #include #if defined(INSIDE_ENCLAVE) && !defined(VIRTUAL_ENCLAVE) diff --git a/src/js/extensions/ccf/historical.cpp b/src/js/extensions/ccf/historical.cpp index 29531960ab5d..191cce422953 100644 --- a/src/js/extensions/ccf/historical.cpp +++ b/src/js/extensions/ccf/historical.cpp @@ -436,8 +436,17 @@ namespace ccf::js::extensions namespace ccf::js { JSClassExoticMethods kv_historical_exotic_methods = { - .get_own_property = extensions::js_historical_kv_lookup}; + .get_own_property = extensions::js_historical_kv_lookup, + .get_own_property_names = {}, + .delete_property = {}, + .define_own_property = {}, + .has_property = {}, + .get_property = {}, + .set_property = {}}; JSClassDef kv_historical_class_def = { .class_name = "Read-only Historical KV Tables", + .finalizer = {}, + .gc_mark = {}, + .call = {}, .exotic = &kv_historical_exotic_methods}; } diff --git a/src/js/extensions/ccf/kv.cpp b/src/js/extensions/ccf/kv.cpp index 68cb664c2e30..1d4b50238153 100644 --- a/src/js/extensions/ccf/kv.cpp +++ b/src/js/extensions/ccf/kv.cpp @@ -151,7 +151,17 @@ namespace ccf::js::extensions namespace ccf::js { JSClassExoticMethods kv_exotic_methods = { - .get_own_property = extensions::js_kv_lookup}; + .get_own_property = extensions::js_kv_lookup, + .get_own_property_names = {}, + .delete_property = {}, + .define_own_property = {}, + .has_property = {}, + .get_property = {}, + .set_property = {}}; JSClassDef kv_class_def = { - .class_name = "KV Tables", .exotic = &kv_exotic_methods}; + .class_name = "KV Tables", + .finalizer = {}, + .gc_mark = {}, + .call = {}, + .exotic = &kv_exotic_methods}; } diff --git a/src/node/acme_client.h b/src/node/acme_client.h index 6198a155bcfe..c5023349e091 100644 --- a/src/node/acme_client.h +++ b/src/node/acme_client.h @@ -303,7 +303,7 @@ namespace ACME if (nonces.empty()) { request_new_nonce( - [=]() { post_as_get(account_url, resource_url, ok_callback); }); + [&, this]() { post_as_get(account_url, resource_url, ok_callback); }); } else { @@ -326,7 +326,7 @@ namespace ACME { if (nonces.empty()) { - request_new_nonce([=]() { + request_new_nonce([&, this]() { post_as_get_json( account_url, resource_url, ok_callback, empty_payload); });