mirror of
https://github.com/BertoldVdb/ZoneDetect.git
synced 2026-04-27 14:57:40 +00:00
Build on AWS Linux so C++ library does not need to be packaged
This commit is contained in:
parent
6db9dca021
commit
abba171e96
2 changed files with 7 additions and 6 deletions
|
|
@ -5,4 +5,4 @@ project(timezone LANGUAGES CXX C)
|
||||||
find_package(aws-lambda-runtime REQUIRED)
|
find_package(aws-lambda-runtime REQUIRED)
|
||||||
add_executable(${PROJECT_NAME} ../library/zonedetect.c main.cpp)
|
add_executable(${PROJECT_NAME} ../library/zonedetect.c main.cpp)
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-lambda-runtime)
|
target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-lambda-runtime)
|
||||||
aws_lambda_package_target(${PROJECT_NAME})
|
aws_lambda_package_target(${PROJECT_NAME} NO_LIBC)
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,17 @@
|
||||||
version: 0.2
|
version: 0.2
|
||||||
|
|
||||||
phases:
|
phases:
|
||||||
|
install:
|
||||||
|
runtime-versions:
|
||||||
|
golang: 1.13 #Dummy, as this is a required parameter
|
||||||
pre_build:
|
pre_build:
|
||||||
commands:
|
commands:
|
||||||
- apt update
|
- yum install -y cmake3 git gcc gcc-c++ make
|
||||||
- apt install -y cmake git
|
|
||||||
- git clone https://github.com/awslabs/aws-lambda-cpp.git
|
- git clone https://github.com/awslabs/aws-lambda-cpp.git
|
||||||
- cd aws-lambda-cpp
|
- cd aws-lambda-cpp
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=~/out
|
- cmake3 .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=~/out
|
||||||
- make && make install
|
- make && make install
|
||||||
- cd ../../
|
- cd ../../
|
||||||
build:
|
build:
|
||||||
|
|
@ -17,7 +19,7 @@ phases:
|
||||||
- cd aws_lambda
|
- cd aws_lambda
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/out
|
- cmake3 .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/out
|
||||||
- make -j 4 aws-lambda-package-timezone
|
- make -j 4 aws-lambda-package-timezone
|
||||||
post_build:
|
post_build:
|
||||||
commands:
|
commands:
|
||||||
|
|
@ -32,4 +34,3 @@ artifacts:
|
||||||
files:
|
files:
|
||||||
- '**/*'
|
- '**/*'
|
||||||
base-directory: aws_lambda/build/output/
|
base-directory: aws_lambda/build/output/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue