File tree Expand file tree Collapse file tree 4 files changed +28
-2
lines changed
Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 1+ version : 0.2
2+ phases :
3+ pre_build :
4+ commands :
5+ - yum install -y zip
6+ build :
7+ commands :
8+ - cmake3 -S . -B build -DENABLE_TESTS=ON -DTEST_RESOURCE_PREFIX=al2arm -GNinja
9+ - cd build
10+ - ninja-build
11+ - ninja-build aws-lambda-package-lambda-test-fun
12+ - ctest3 --output-on-failure
Original file line number Diff line number Diff line change 1+ FROM public.ecr.aws/amazonlinux/amazonlinux:2
2+ RUN yum install -y cmake3 ninja-build git gcc-c++ openssl-devel curl-devel
3+ RUN git clone https://github.com/aws/aws-sdk-cpp --recurse-submodules
4+ RUN cmake3 -Saws-sdk-cpp -Baws-sdk-cpp/build -DBUILD_ONLY=lambda -DENABLE_TESTING=OFF -GNinja
5+ RUN cd aws-sdk-cpp/build && ninja-build && ninja-build install
6+ RUN yum install -y openssl-static
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ sh cmake-install --skip-license --prefix=/usr --exclude-subdirectory;
99
1010RUN pip3 install --upgrade pip
1111
12- RUN git clone https://github.com/aws/aws-sdk-cpp.git
12+ RUN git clone https://github.com/aws/aws-sdk-cpp.git --recurse-submodules
1313
1414RUN update-alternatives --set cc /usr/bin/clang
1515RUN update-alternatives --set c++ /usr/bin/clang++
Original file line number Diff line number Diff line change 1+ #include < aws/lambda/model/Architecture.h>
12#include < aws/core/client/ClientConfiguration.h>
23#include < aws/core/utils/Array.h>
34#include < aws/core/utils/Outcome.h>
1617#include < cstdio>
1718#include < sys/stat.h>
1819#include < unistd.h>
20+ #include < vector>
1921
2022extern std::string aws_prefix;
2123
@@ -93,7 +95,13 @@ struct LambdaRuntimeTest : public ::testing::Test {
9395 Model::FunctionCode funcode;
9496 funcode.SetZipFile (std::move (zip_file_bytes));
9597 create_function_request.SetCode (std::move (funcode));
96- create_function_request.SetRuntime (Aws::Lambda::Model::Runtime::provided);
98+ create_function_request.SetRuntime (Aws::Lambda::Model::Runtime::provided_al2);
99+
100+ std::vector<Aws::Lambda::Model::Architecture> lambda_architectures = {Aws::Lambda::Model::Architecture::x86_64};
101+ #ifdef __aarch64__
102+ lambda_architectures[0 ] = Aws::Lambda::Model::Architecture::arm64;
103+ #endif
104+ create_function_request.SetArchitectures (lambda_architectures);
97105
98106 auto outcome = m_lambda_client.CreateFunction (create_function_request);
99107 ASSERT_TRUE (outcome.IsSuccess ()) << " Failed to create function " << function_name;
You can’t perform that action at this time.
0 commit comments