Skip to content

Commit b9f731d

Browse files
authored
Add musl arm64 binary (#595)
1 parent aa5caa9 commit b9f731d

File tree

4 files changed

+39
-11
lines changed

4 files changed

+39
-11
lines changed

.github/workflows/ci.yml

+4-10
Original file line numberDiff line numberDiff line change
@@ -65,30 +65,24 @@ jobs:
6565
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
6666
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }}
6767
68-
linux-musl-armv7:
69-
runs-on: ubuntu-24.04 # latest
68+
linux-musl-armv8:
69+
runs-on: codebuild-aws-crt-nodejs-arm64-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
7070
strategy:
7171
fail-fast: false
72-
matrix:
73-
image:
74-
- alpine-3.16-x64
7572
steps:
7673
- uses: aws-actions/configure-aws-credentials@v4
7774
with:
7875
role-to-assume: ${{ env.CRT_CI_ROLE }}
7976
aws-region: ${{ env.AWS_DEFAULT_REGION }}
80-
- name: Install qemu/docker
81-
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
8277
- name: Checkout Sources
83-
uses: actions/checkout@v2
78+
uses: actions/checkout@v4
8479
with:
8580
submodules: true
8681
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
8782
- name: Build ${{ env.PACKAGE_NAME }}
8883
run: |
89-
export AWS_CRT_ARCH=armv7
9084
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
91-
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-alpine-3.16-armv7 build -p ${{ env.PACKAGE_NAME }}
85+
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-alpine-3.16-arm64 build -p ${{ env.PACKAGE_NAME }}
9286
9387
linux-compiler-compat:
9488
runs-on: ubuntu-24.04 # latest
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 0.2
2+
phases:
3+
install:
4+
commands:
5+
build:
6+
commands:
7+
- mkdir linux-arm64-musl
8+
- cd aws-crt-nodejs
9+
- ./continuous-delivery/generic-linux-build.sh aws-crt-alpine-3.16-arm64
10+
- cp -r dist/bin/linux-arm64-musl/* ../linux-arm64-musl/
11+
12+
post_build:
13+
commands:
14+
15+
artifacts:
16+
files:
17+
- 'linux-arm64-musl/**/*'
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
IMAGE_NAME=$1
6+
shift
7+
8+
# Pry the builder version this CRT is using out of ci.yml
9+
BUILDER_VERSION=$(cat .github/workflows/ci.yml | grep 'BUILDER_VERSION:' | sed 's/\s*BUILDER_VERSION:\s*\(.*\)/\1/')
10+
echo "Using builder version ${BUILDER_VERSION}"
11+
12+
aws ecr get-login-password | docker login 123124136734.dkr.ecr.us-east-1.amazonaws.com -u AWS --password-stdin
13+
export DOCKER_IMAGE=123124136734.dkr.ecr.us-east-1.amazonaws.com/${IMAGE_NAME}:${BUILDER_VERSION}
14+
15+
export BRANCH_TAG=$(git describe --tags)
16+
docker run --mount type=bind,src=$(pwd),dst=/root/aws-crt-nodejs --env CXXFLAGS $DOCKER_IMAGE --version=${BUILDER_VERSION} build -p aws-crt-nodejs --branch ${BRANCH_TAG} run_tests=false
17+
docker container prune -f

continuous-delivery/pack.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ mkdir $UNZIP
3939
tar -xf aws-crt-$CURRENT_TAG.tgz -C $UNZIP
4040
PACK_FILE_SIZE_KB=$(du -sk $UNZIP | awk '{print $1}')
4141
echo "Current package size: ${PACK_FILE_SIZE_KB}"
42-
if expr $PACK_FILE_SIZE_KB \> "$((27000))" ; then
42+
if expr $PACK_FILE_SIZE_KB \> "$((33000))" ; then
4343
# the package size is too large, return -1
4444
echo "Package size is too large!"
4545
exit -1

0 commit comments

Comments
 (0)