Skip to content

Commit 0187206

Browse files
committed
Add ARM64/aarch64 support
1 parent ede89a2 commit 0187206

File tree

4 files changed

+39
-8
lines changed

4 files changed

+39
-8
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inputs:
1111
default: 'minimal'
1212
architecture:
1313
required: false
14-
description: 'The architecture of the SDK: x86_64 or i686'
14+
description: 'The architecture of the SDK: x86_64, i686 or aarch64. Note that "aarch64" uses the x86_64 SDK, but adds "clangarm64" to the path.'
1515
default: 'x86_64'
1616
msys:
1717
required: false

dist/index.js

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ async function run(): Promise<void> {
1515
}
1616
const flavor = core.getInput('flavor')
1717
const architecture = core.getInput('architecture')
18+
const architectureToDownload =
19+
architecture === 'aarch64' ? 'x86_64' : architecture
1820
const verbose = core.getInput('verbose')
1921
const msysMode = core.getInput('msys') === 'true'
2022

2123
const {artifactName, download, id} =
2224
flavor === 'minimal'
23-
? await get(flavor, architecture)
24-
: await getViaGit(flavor, architecture)
25+
? await get(flavor, architectureToDownload)
26+
: await getViaGit(flavor, architectureToDownload)
2527
const outputDirectory = core.getInput('path') || `C:/${artifactName}`
2628
let useCache: boolean
2729
switch (core.getInput('cache')) {
@@ -64,7 +66,22 @@ async function run(): Promise<void> {
6466
}
6567
}
6668

67-
const mingw = architecture === 'i686' ? 'MINGW32' : 'MINGW64'
69+
let mingw = ''
70+
71+
switch (architecture) {
72+
case 'i686':
73+
mingw = 'MINGW32'
74+
break
75+
case 'x86_64':
76+
mingw = 'MINGW64'
77+
break
78+
case 'aarch64':
79+
mingw = 'CLANGARM64'
80+
break
81+
default:
82+
core.setFailed(`Invalid architecture ${architecture} specified`)
83+
}
84+
6885
const msystem = msysMode ? 'MSYS' : mingw
6986

7087
const binPaths = [

0 commit comments

Comments
 (0)