Skip to content

Commit deb8d8a

Browse files
authored
fix: use correct libgcc for arm64 (#68)
Signed-off-by: Firas Cheaib <[email protected]>
1 parent b2472ca commit deb8d8a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This action supports the following inputs:
3232
| -------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
3333
| `python-version` | Not specified | Version range or exact version of a Python version to use, using SemVer's version range syntax. |
3434
| `python-version-file` | `pyproject.toml` | File containing the Python version to use. Example: .`python-version` |
35-
| `architecture` | `x64` | The target architecture (x86, x64) of the Python interpreter. |
35+
| `architecture` | `x64` | The target architecture (x86, x64, arm64) of the Python interpreter. |
3636
| `allow-python-prereleases` | `false` | Allow prerelease versions of Python to be installed. |
3737
| `token` | `${{ github.token }}` | Used to pull python distributions from actions/python-versions. Since there's a default, this is typically not supplied by the user. |
3838
| `version` | Not specified | The version of PDM to install, or 'head' to install from the main branch. |

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
python-version-file:
99
description: 'File containing the Python version to use. Example: .python-version'
1010
architecture:
11-
description: 'The target architecture (x86, x64) of the Python interpreter.'
11+
description: 'The target architecture (x86, x64, arm64) of the Python interpreter.'
1212
required: false
1313
allow-python-prereleases:
1414
description: Allow prerelease versions of Python to be installed.

src/setup-pdm.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ async function run(): Promise<void> {
4545

4646
if (process.platform === 'linux') {
4747
// See https://github.com/actions/virtual-environments/issues/2803
48-
core.exportVariable('LD_PRELOAD', '/lib/x86_64-linux-gnu/libgcc_s.so.1')
48+
if (process.arch === 'x64') {
49+
core.exportVariable('LD_PRELOAD', '/lib/x86_64-linux-gnu/libgcc_s.so.1')
50+
}
51+
else if (process.arch === 'arm64') {
52+
core.exportVariable('LD_PRELOAD', '/lib/aarch64-linux-gnu/libgcc_s.so.1')
53+
}
4954
}
5055
await exec(IS_WINDOWS ? 'python' : 'python3', cmdArgs, { input: await utils.fetchUrlAsBuffer(INSTALL_SCRIPT_URL) })
5156
const installOutput: InstallOutput = JSON.parse(await utils.readFile('install-output.json'))

0 commit comments

Comments
 (0)