Skip to content

Commit ffbabb1

Browse files
authored
add native Apple Silicon / M1 binaries (#12)
1 parent 46611af commit ffbabb1

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
- runner: macos-11
2020
os: darwin
2121
arch: amd64
22+
- runner: macos-13-xlarge
23+
os: darwin
24+
arch: arm64
2225
- runner: windows-2019
2326
os: windows
2427
arch: amd64
@@ -64,7 +67,10 @@ jobs:
6467
run: make clean all
6568

6669
- name: Setup Docker on MacOS
67-
if: matrix.os == 'darwin'
70+
# Install docker and start Colima on MacOS (except it's the large runner)
71+
# GitHub xlarge MacOS runner cannot run Docker containers:
72+
# - https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/
73+
if: matrix.os == 'darwin' && matrix.runner != 'macos-13-xlarge'
6874
run: |
6975
brew install docker
7076
colima start
@@ -81,32 +87,35 @@ jobs:
8187
8288
- name: Community Docker Smoke tests (Linux, MacOS)
8389
shell: bash
84-
# GitHub Windows runner cannot run Docker containers (https://github.com/orgs/community/discussions/25491)
85-
# Skip these checks for forks (forks do not have access to the LocalStack Pro API key)
86-
if: matrix.os != 'windows' && !github.event.pull_request.head.repo.fork
90+
# GitHub Windows and xlarge MacOS runner cannot run Docker containers:
91+
# - https://github.com/orgs/community/discussions/25491
92+
# - https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/
93+
if: matrix.os != 'windows' && matrix.runner != 'macos-13-xlarge'
8794
run: |
8895
# Pull images to avoid making smoke tests vulnerable to system behavior (docker pull speed)
8996
docker pull localstack/localstack
9097
cd dist-bin
9198
# start community
9299
./localstack start -d
93-
./localstack wait -t 60
100+
./localstack wait -t 180
94101
./localstack status services --format plain
95102
./localstack status services --format plain | grep "s3=available"
96103
./localstack stop
97104
98105
- name: Pro Docker Smoke tests (Linux, MacOS)
99106
shell: bash
100-
# GitHub Windows runner cannot run Docker containers (https://github.com/orgs/community/discussions/25491)
107+
# GitHub Windows and xlarge MacOS runner cannot run Docker containers:
108+
# - https://github.com/orgs/community/discussions/25491
109+
# - https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/
101110
# Skip these checks for forks (forks do not have access to the LocalStack Pro API key)
102-
if: matrix.os != 'windows' && !github.event.pull_request.head.repo.fork
111+
if: matrix.os != 'windows' && matrix.runner != 'macos-13-xlarge' && !github.event.pull_request.head.repo.fork
103112
run: |
104113
# Pull images to avoid making smoke tests vulnerable to system behavior (docker pull speed)
105114
docker pull localstack/localstack-pro
106115
cd dist-bin
107116
# start pro
108117
LOCALSTACK_API_KEY=${{ secrets.TEST_LOCALSTACK_API_KEY }} ./localstack start -d
109-
./localstack wait -t 60
118+
./localstack wait -t 180
110119
./localstack status services --format plain
111120
./localstack status services --format plain | grep "xray=available"
112121
./localstack stop
@@ -163,14 +172,6 @@ jobs:
163172
with:
164173
path: builds
165174

166-
# TODO remove this section once we have native darwin arm64 builds
167-
# This step is currently necessary for the homebrew action to pick up the MacOS AMD64 package for MacOS ARM64 / M1
168-
# GitHub Roadmap: https://github.com/github/roadmap/issues/528
169-
- name: (Intermediate) Use Darwin AMD64 for Darwin ARM64
170-
run: |
171-
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
172-
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
173-
174175
- name: Generate Checksums
175176
run: |
176177
# move all files from the builds subdirectories to the builds root folder

0 commit comments

Comments
 (0)