Skip to content

Commit

Permalink
let's try to add ci using arm Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Jan 6, 2025
1 parent 2eee416 commit fb5ae49
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
20 changes: 20 additions & 0 deletions continuous-delivery/build-binaries-linux-musl-arm64.yml
Original file line number Diff line number Diff line change
@@ -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/**/*'
19 changes: 19 additions & 0 deletions continuous-delivery/musl-linux-build.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fb5ae49

Please sign in to comment.