-
Notifications
You must be signed in to change notification settings - Fork 94
Add AWS CodeBuild workflow and Dockerfile for ArchLinux #161
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7331e53
Add AWS CodeBuild workflow and Dockerfile for ArchLinux
bmoffatt d97575e
Merge branch 'master' into arch-linux-ci
bmoffatt a4356a1
Empty commit
bmoffatt ddb8fef
git checkout origin/ci-files-refactor ci/codebuild/build.sh
bmoffatt 897ab60
added a note about -DUSE_OPENSSL=OFF
bmoffatt c578ee8
Merge branch 'master' into arch-linux-ci
bmoffatt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 0.2 | ||
# This uses the docker image specified in ci/docker/arch-linux | ||
phases: | ||
build: | ||
commands: | ||
- echo Build started on `date` | ||
- ./ci/codebuild/build.sh -DTEST_RESOURCE_PREFIX=lambda-cpp-archbtw | ||
- ./ci/codebuild/run-tests.sh aws-lambda-package-lambda-test-fun | ||
- echo Build completed on `date` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM public.ecr.aws/docker/library/archlinux:latest | ||
|
||
RUN pacman -Sy --noconfirm git | ||
RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git | ||
RUN pacman -Sy --noconfirm \ | ||
cmake \ | ||
ninja \ | ||
clang \ | ||
curl \ | ||
zip | ||
|
||
RUN CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -Saws-sdk-cpp -Baws-sdk-cpp/build -GNinja \ | ||
-DBUILD_ONLY=lambda \ | ||
-DUSE_OPENSSL=OFF \ | ||
-DENABLE_TESTING=OFF | ||
RUN cmake --build aws-sdk-cpp/build -t install | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fun one - basically, because reasons (aws/aws-sdk-cpp#1910), including the current version of AWS SDK into the project (as the tests do) - CMake barfs at test time (
./ci/codebuild/build.sh
inarch-linux.yml
) complaining about not being able to find openssl, enough though it was found just fine when doing the SDK build + install! For the other build environments we have, something likeyum install -y openssl-static
is resolving the dependency, but an equivalent package is not available (that I could find anyways) in this distro.So... the workaround I've been doing is using the experimental S2N support in the SDK, triggered by this flag. This works fine, but also brought along the requirement to use
clang
instead ofgcc
due to differences in warnings/errors reported on when Came compiled with this distro's gcc/g++.🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes!
You should probably put that blurb of reasoning as a comment in the docker file.
I wish the C++ SDK never adopted the CRT. Oh Well!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a shorter version of this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Arch linux, the AUR has a package openssl-static.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If desired, it could be installed with:
However, it will build openssl from source, which takes quite a while.