Skip to content

Commit c71dd89

Browse files
authored
feat: support linux-arm64 package for native installer (#115)
1 parent f664fad commit c71dd89

File tree

10 files changed

+11924
-11227
lines changed

10 files changed

+11924
-11227
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v2
42+
uses: github/codeql-action/init@v3
4343
with:
4444
languages: ${{ matrix.language }}
4545
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -50,7 +50,7 @@ jobs:
5050
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5151
# If this step fails, then you should remove it and run the build manually (see below)
5252
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v2
53+
uses: github/codeql-action/autobuild@v3
5454

5555
# ℹ️ Command-line programs to run using the OS shell.
5656
# 📚 https://git.io/JvXDl
@@ -64,4 +64,4 @@ jobs:
6464
# make release
6565

6666
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v2
67+
uses: github/codeql-action/analyze@v3

.github/workflows/test.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
13+
- uses: actions/setup-node@v5
1414
- run: npm ci
1515
- run: npm test
1616

@@ -21,6 +21,7 @@ jobs:
2121
os:
2222
- ubuntu-latest
2323
- ubuntu-22.04
24+
- ubuntu-24.04-arm
2425
name: Native installer / ${{ matrix.os }}
2526
runs-on: ${{ matrix.os }}
2627
steps:
@@ -30,15 +31,15 @@ jobs:
3031
uses: ./
3132
with:
3233
use-installer: true
33-
version: "1.71.0"
34-
- run: sam --version | grep -F 1.71.0
34+
version: "1.104.0"
35+
- run: sam --version | grep -F 1.104.0
3536

3637
- name: Test official installer (pinned version; should use cache)
3738
uses: ./
3839
with:
3940
use-installer: true
40-
version: "1.71.0"
41-
- run: sam --version | grep -F 1.71.0
41+
version: "1.104.0"
42+
- run: sam --version | grep -F 1.104.0
4243

4344
- name: Test official installer (latest version)
4445
uses: ./
@@ -58,12 +59,19 @@ jobs:
5859
- windows-latest
5960
- macos-latest
6061
- ubuntu-22.04
61-
- windows-2019
62+
- ubuntu-24.04-arm
6263
python:
63-
- "3.8"
64+
- "3.9"
65+
- "3.10"
6466
- "3.11"
67+
- "3.12"
68+
- "3.13"
6569
name: PyPI / ${{ matrix.os }} / ${{ matrix.python }}
6670
runs-on: ${{ matrix.os }}
71+
env:
72+
# Set SAM versions based on Python version
73+
SAM_VERSION: ${{ contains(fromJson('["3.12", "3.13"]'), matrix.python) && '1.128.0' || '1.18.2' }}
74+
INSTALLER_VERSION: ${{ contains( matrix.os, '-arm') && '1.130.0' || '1.71.0' }}
6775
steps:
6876
- uses: actions/checkout@v4
6977
- uses: actions/setup-python@v5
@@ -75,9 +83,9 @@ jobs:
7583
uses: ./
7684
with:
7785
use-installer: true
78-
version: "1.71.0"
86+
version: ${{ env.INSTALLER_VERSION }}
7987
- if: startsWith(matrix.os, 'ubuntu')
80-
run: sam --version | grep -F 1.71.0
88+
run: sam --version | grep -F ${{ env.INSTALLER_VERSION }}
8189

8290
- name: Test official installer (latest version)
8391
if: startsWith(matrix.os, 'ubuntu')
@@ -93,8 +101,8 @@ jobs:
93101
# Test setup specific version
94102
- uses: ./
95103
with:
96-
version: "1.18.2"
97-
- run: sam --version | grep -F 1.18.2
104+
version: ${{ env.SAM_VERSION }}
105+
- run: sam --version | grep -F ${{ env.SAM_VERSION }}
98106

99107
# Test setup latest version
100108
- uses: ./
@@ -107,16 +115,17 @@ jobs:
107115
- run: sam init --name sam-app --runtime nodejs20.x --dependency-manager npm --app-template hello-world
108116

109117
# Test sam build
110-
- uses: actions/setup-node@v4
118+
- uses: actions/setup-node@v5
111119
with:
112120
node-version: "20"
113121
- run: sam build
114122
working-directory: ./sam-app
115123

116124
# Test sam build --use-container
117125
# Doesn't work as-is on macOS or Windows due to licensing:
118-
# - https://github.com/actions/virtual-environments/issues/17
119-
# - https://github.com/actions/virtual-environments/issues/1143
120-
- if: startsWith(matrix.os, 'ubuntu')
126+
# - https://github.com/actions/runner-images/issues/17
127+
# - https://github.com/actions/runner-images/issues/1143
128+
# Ubuntu ARM runners are not yet GA
129+
- if: startsWith(matrix.os, 'ubuntu') && !contains(matrix.os, '-arm')
121130
run: sam build --use-container
122131
working-directory: ./sam-app

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules/
2+
.idea/

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ The AWS SAM CLI version to install. Installs the latest version by default.
5050
>
5151
> This is the recommended approach on supported platforms. It does not require Python to be installed, and is faster than the default installation method.
5252
>
53-
> Currently supports Linux x86-64 runners.
54-
55-
Set to `true` to set up AWS SAM CLI using a native installer. Defaults to `false`.
53+
> Currently supports Linux x86-64 and aarch64 (ARM) runners. For ARM architecture, only versions 1.104.0 and above are supported.
54+
> Set to `true` to set up AWS SAM CLI using a native installer. Defaults to `false`.
5655

5756
### `python`
5857

0 commit comments

Comments
 (0)