Skip to content

Commit 7bdbae7

Browse files
committed
Add s2n CI jobs
1 parent 8332501 commit 7bdbae7

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,52 @@ jobs:
185185
python3 codebuild/macos_compatibility_check.py arm64
186186
python3 codebuild/macos_compatibility_check.py x64
187187
188+
macos-s2n:
189+
runs-on: macos-14 # latest
190+
env:
191+
AWS_CRT_USE_NON_FIPS_TLS_13: 1
192+
steps:
193+
- uses: aws-actions/configure-aws-credentials@v4
194+
with:
195+
role-to-assume: ${{ env.CRT_CI_ROLE }}
196+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
197+
- name: Build ${{ env.PACKAGE_NAME }} + consumers
198+
run: |
199+
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
200+
chmod a+x builder
201+
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream
202+
- name: Check backward compatibility for Macos
203+
run: |
204+
cd aws-crt-nodejs
205+
python3 codebuild/macos_compatibility_check.py arm64
206+
207+
macos-x64-s2n:
208+
runs-on: macos-14-large # latest
209+
env:
210+
AWS_CRT_USE_NON_FIPS_TLS_13: 1
211+
steps:
212+
- uses: aws-actions/configure-aws-credentials@v4
213+
with:
214+
role-to-assume: ${{ env.CRT_CI_ROLE }}
215+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
216+
- name: Build ${{ env.PACKAGE_NAME }} + consumers
217+
run: |
218+
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
219+
chmod a+x builder
220+
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream
221+
# check that OSX can build arm64 binaries from an x64 machine (which happens during release)
222+
- name: Cross-compile arm64
223+
run: |
224+
cd aws-crt-nodejs
225+
node ./scripts/build --target-arch arm64 -DAWS_WARNINGS_ARE_ERRORS=ON
226+
test `lipo dist/bin/darwin-arm64-cruntime/aws-crt-nodejs.node -archs` = "arm64"
227+
test `lipo dist/bin/darwin-x64-cruntime/aws-crt-nodejs.node -archs` = "x86_64"
228+
- name: Check backward compatibility for Macos
229+
run: |
230+
cd aws-crt-nodejs
231+
python3 codebuild/macos_compatibility_check.py arm64
232+
python3 codebuild/macos_compatibility_check.py x64
233+
188234
# check that docs can still build
189235
check-docs:
190236
runs-on: ubuntu-24.04 # latest

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ if (BUILD_DEPS)
3030
set(BUILD_TESTING OFF)
3131

3232
add_subdirectory(crt/aws-c-common)
33-
if (UNIX AND NOT APPLE)
33+
# On Linux and BSD, we use S2N for TLS and AWS-LC crypto.
34+
# On Windows, we use the default OS libraries.
35+
# On Apple, we use the default OS libraries by default, but support S2N usage.
36+
if (UNIX)
3437
include(AwsPrebuildDependency)
3538
# s2n-tls uses libcrypto during its configuration, so we need to prebuild aws-lc.
3639
aws_prebuild_dependency(

0 commit comments

Comments
 (0)