diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d1d49ec..1240cb08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,9 +69,6 @@ jobs: runs-on: ubuntu-24.04 # latest strategy: fail-fast: false - matrix: - image: - - alpine-3.16-x64 steps: - uses: aws-actions/configure-aws-credentials@v4 with: @@ -90,6 +87,25 @@ jobs: 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-musl-armv8: + runs-on: macos-latest # latest + strategy: + fail-fast: false + steps: + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ env.CRT_CI_ROLE }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} + - name: Checkout Sources + uses: actions/checkout@v2 + 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: | + 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-arm64 build -p ${{ env.PACKAGE_NAME }} + linux-compiler-compat: runs-on: ubuntu-24.04 # latest strategy: 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..3c3d6bc6 --- /dev/null +++ b/continuous-delivery/build-binaries-linux-musl-arm64.yml @@ -0,0 +1,20 @@ +version: 0.2 +phases: + install: + commands: + pre_build: + commands: + - export CC=gcc + build: + commands: + - mkdir linux-arm64-musl + - cd aws-crt-nodejs + - ./continuous-delivery/musl-linux-build.sh aws-crt-alpine-3.16-arm64 linux-aarch_64-musl + - cp -r dist/bin/linux-arm64-musl/* ../linux-arm64-musl/ + + post_build: + commands: + +artifacts: + files: + - 'linux-arm64-musl/**/*' diff --git a/continuous-delivery/musl-linux-build.sh b/continuous-delivery/musl-linux-build.sh new file mode 100755 index 00000000..08771d94 --- /dev/null +++ b/continuous-delivery/musl-linux-build.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -ex + +IMAGE_NAME=$1 +shift +CLASSIFIER=$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 AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION --env CXXFLAGS --env AWS_CRT_ARCH $DOCKER_IMAGE --version=${BUILDER_VERSION} build -p aws-crt-nodejs --classifier ${CLASSIFIER} --branch ${BRANCH_TAG} run_tests=false +docker container prune -f