Skip to content

Commit

Permalink
add native Apple Silicon / M1 binaries (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrashed authored Oct 3, 2023
1 parent 46611af commit ffbabb1
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- runner: macos-11
os: darwin
arch: amd64
- runner: macos-13-xlarge
os: darwin
arch: arm64
- runner: windows-2019
os: windows
arch: amd64
Expand Down Expand Up @@ -64,7 +67,10 @@ jobs:
run: make clean all

- name: Setup Docker on MacOS
if: matrix.os == 'darwin'
# Install docker and start Colima on MacOS (except it's the large runner)
# GitHub xlarge MacOS runner cannot run Docker containers:
# - https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/
if: matrix.os == 'darwin' && matrix.runner != 'macos-13-xlarge'
run: |
brew install docker
colima start
Expand All @@ -81,32 +87,35 @@ jobs:
- name: Community Docker Smoke tests (Linux, MacOS)
shell: bash
# GitHub Windows runner cannot run Docker containers (https:/orgs/community/discussions/25491)
# Skip these checks for forks (forks do not have access to the LocalStack Pro API key)
if: matrix.os != 'windows' && !github.event.pull_request.head.repo.fork
# GitHub Windows and xlarge MacOS runner cannot run Docker containers:
# - https:/orgs/community/discussions/25491
# - https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/
if: matrix.os != 'windows' && matrix.runner != 'macos-13-xlarge'
run: |
# Pull images to avoid making smoke tests vulnerable to system behavior (docker pull speed)
docker pull localstack/localstack
cd dist-bin
# start community
./localstack start -d
./localstack wait -t 60
./localstack wait -t 180
./localstack status services --format plain
./localstack status services --format plain | grep "s3=available"
./localstack stop
- name: Pro Docker Smoke tests (Linux, MacOS)
shell: bash
# GitHub Windows runner cannot run Docker containers (https:/orgs/community/discussions/25491)
# GitHub Windows and xlarge MacOS runner cannot run Docker containers:
# - https:/orgs/community/discussions/25491
# - https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/
# Skip these checks for forks (forks do not have access to the LocalStack Pro API key)
if: matrix.os != 'windows' && !github.event.pull_request.head.repo.fork
if: matrix.os != 'windows' && matrix.runner != 'macos-13-xlarge' && !github.event.pull_request.head.repo.fork
run: |
# Pull images to avoid making smoke tests vulnerable to system behavior (docker pull speed)
docker pull localstack/localstack-pro
cd dist-bin
# start pro
LOCALSTACK_API_KEY=${{ secrets.TEST_LOCALSTACK_API_KEY }} ./localstack start -d
./localstack wait -t 60
./localstack wait -t 180
./localstack status services --format plain
./localstack status services --format plain | grep "xray=available"
./localstack stop
Expand Down Expand Up @@ -163,14 +172,6 @@ jobs:
with:
path: builds

# TODO remove this section once we have native darwin arm64 builds
# This step is currently necessary for the homebrew action to pick up the MacOS AMD64 package for MacOS ARM64 / M1
# GitHub Roadmap: https:/github/roadmap/issues/528
- name: (Intermediate) Use Darwin AMD64 for Darwin ARM64
run: |
cp ./builds/${{github.event.repository.name}}-${{needs.build.outputs.cli_version}}-darwin-amd64/* ./builds/${{github.event.repository.name}}-${{needs.build.outputs.cli_version}}-darwin-amd64/${{github.event.repository.name}}-${{needs.build.outputs.cli_version}}-darwin-arm64.tar.gz
cp ./builds/${{github.event.repository.name}}-${{needs.build.outputs.cli_version}}-darwin-amd64-onefile/* ./builds/${{github.event.repository.name}}-${{needs.build.outputs.cli_version}}-darwin-amd64-onefile/${{github.event.repository.name}}-${{needs.build.outputs.cli_version}}-darwin-arm64-onefile.tar.gz
- name: Generate Checksums
run: |
# move all files from the builds subdirectories to the builds root folder
Expand Down

0 comments on commit ffbabb1

Please sign in to comment.