Skip to content

Commit 57ce686

Browse files
bmoffattspecious
andauthored
Enable alpine ci (#137)
* add files for running the CI tests on alpine linux * ensure that libexecinfo is linked in builds not using glibc * busybox grep doesn't know -F as --fixed-strings (cherry picked from commit 935f4f5) * Added comment that explains -F flag (cherry picked from commit c1480f7) * update dockerfile Co-authored-by: Ildar Sagdejev <[email protected]>
1 parent b3cc261 commit 57ce686

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ endif()
4141

4242
target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIRS})
4343

44+
find_package(Backtrace REQUIRED)
45+
target_link_libraries(${PROJECT_NAME} PRIVATE ${Backtrace_LIBRARIES})
46+
4447
target_compile_options(${PROJECT_NAME} PRIVATE
4548
"-fno-exceptions"
4649
"-fno-rtti"

ci/codebuild/alpine-3.15.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 0.2
2+
# This uses the docker image specified in ci/docker/alpine-linux-3.15
3+
phases:
4+
pre_build:
5+
commands:
6+
- pip install awscli
7+
- ci/codebuild/build-cpp-sdk.sh
8+
build:
9+
commands:
10+
- echo Build started on `date`
11+
- ci/codebuild/build.sh -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_TESTS=ON -DTEST_RESOURCE_PREFIX=alpine315
12+
- ci/codebuild/run-tests.sh aws-lambda-package-lambda-test-fun alpine315
13+
post_build:
14+
commands:
15+
- echo Build completed on `date`
16+

ci/docker/alpine-linux-3.15

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM alpine:3.15
2+
3+
RUN apk add --no-cache g++ cmake git bash py3-pip libexecinfo-dev ninja curl-dev zlib-dev zip
4+
5+
RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git

ci/docker/alpine-linux-3.8

-5
This file was deleted.

packaging/packager

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ function pluck_so_files() {
6161
}
6262

6363
function package_libc_alpine() {
64-
if grep --fixed-strings "Alpine Linux" < /etc/os-release > /dev/null; then
64+
# -F matches a fixed string rather than a regex (grep that comes with busybox doesn't know --fixed-strings)
65+
if grep -F "Alpine Linux" < /etc/os-release > /dev/null; then
6566
if type apk > /dev/null 2>&1; then
6667
apk info --contents musl 2>/dev/null | pluck_so_files | sed 's/^/\//'
6768
fi

0 commit comments

Comments
 (0)