diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d1d49ec..43d024c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,30 +65,24 @@ jobs: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }} - linux-musl-armv7: - runs-on: ubuntu-24.04 # latest + linux-musl-armv8: + runs-on: codebuild-aws-crt-nodejs-arm64-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large strategy: fail-fast: false - matrix: - image: - - alpine-3.16-x64 steps: - uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ env.CRT_CI_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} - - name: Install qemu/docker - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - name: Checkout Sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true # We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages - name: Build ${{ env.PACKAGE_NAME }} run: | - export AWS_CRT_ARCH=armv7 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 - ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-alpine-3.16-armv7 build -p ${{ env.PACKAGE_NAME }} + ./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-alpine-3.16-arm64 build -p ${{ env.PACKAGE_NAME }} linux-compiler-compat: runs-on: ubuntu-24.04 # latest diff --git a/continuous-delivery/build-binaries-linux-musl-arm64.yml b/continuous-delivery/build-binaries-linux-musl-arm64.yml new file mode 100644 index 00000000..8fada88c --- /dev/null +++ b/continuous-delivery/build-binaries-linux-musl-arm64.yml @@ -0,0 +1,17 @@ +version: 0.2 +phases: + install: + commands: + build: + commands: + - mkdir linux-arm64-musl + - cd aws-crt-nodejs + - ./continuous-delivery/generic-linux-build.sh aws-crt-alpine-3.16-arm64 + - cp -r dist/bin/linux-arm64-musl/* ../linux-arm64-musl/ + + post_build: + commands: + +artifacts: + files: + - 'linux-arm64-musl/**/*' diff --git a/continuous-delivery/generic-linux-build.sh b/continuous-delivery/generic-linux-build.sh new file mode 100755 index 00000000..cbe244fa --- /dev/null +++ b/continuous-delivery/generic-linux-build.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -ex + +IMAGE_NAME=$1 +shift + +# Pry the builder version this CRT is using out of ci.yml +BUILDER_VERSION=$(cat .github/workflows/ci.yml | grep 'BUILDER_VERSION:' | sed 's/\s*BUILDER_VERSION:\s*\(.*\)/\1/') +echo "Using builder version ${BUILDER_VERSION}" + +aws ecr get-login-password | docker login 123124136734.dkr.ecr.us-east-1.amazonaws.com -u AWS --password-stdin +export DOCKER_IMAGE=123124136734.dkr.ecr.us-east-1.amazonaws.com/${IMAGE_NAME}:${BUILDER_VERSION} + +export BRANCH_TAG=$(git describe --tags) +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 +docker container prune -f diff --git a/continuous-delivery/pack.sh b/continuous-delivery/pack.sh index d5fc0717..fbf0ea89 100644 --- a/continuous-delivery/pack.sh +++ b/continuous-delivery/pack.sh @@ -39,7 +39,7 @@ mkdir $UNZIP tar -xf aws-crt-$CURRENT_TAG.tgz -C $UNZIP PACK_FILE_SIZE_KB=$(du -sk $UNZIP | awk '{print $1}') echo "Current package size: ${PACK_FILE_SIZE_KB}" -if expr $PACK_FILE_SIZE_KB \> "$((27000))" ; then +if expr $PACK_FILE_SIZE_KB \> "$((33000))" ; then # the package size is too large, return -1 echo "Package size is too large!" exit -1