Skip to content

Commit 8022558

Browse files
johnnynunezJimver
andauthored
Jimver#379 ARM Runner + CUDA (Jimver#378)
* Add support for ARM architecture for linux local/network installs --------- Co-authored-by: Jimver <[email protected]>
1 parent a47004d commit 8022558

File tree

15 files changed

+196
-29
lines changed

15 files changed

+196
-29
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Ubuntu",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/base:jammy",
6+
"image": "mcr.microsoft.com/devcontainers/base:noble",
77
"features": {
88
"ghcr.io/devcontainers-contrib/features/volta:1": {}
99
}

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
os: [windows-2022, windows-2019, ubuntu-22.04, ubuntu-20.04]
23+
os: [windows-2025, windows-2022, ubuntu-24.04, ubuntu-22.04, ubuntu-24.04-arm, ubuntu-22.04-arm]
2424
method: [local, network]
2525
runs-on: ${{ matrix.os }}
2626

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This action installs the [NVIDIA® CUDA® Toolkit](https://developer.nvidia.com/
88

99
**Optional** The CUDA version to install. View `src/link/windows-links.ts` and `src/link/linux-links.ts` for available versions.
1010

11-
Default: `'12.6.1'`.
11+
Default: `'12.8.0'`.
1212

1313
### `sub-packages`
1414

@@ -88,7 +88,7 @@ The path where cuda is installed (same as `CUDA_PATH` in `GITHUB_ENV`).
8888

8989
```yaml
9090
steps:
91-
- uses: Jimver/[email protected].20
91+
- uses: Jimver/[email protected].21
9292
id: cuda-toolkit
9393
with:
9494
cuda: '12.5.0'

__tests__/arch.test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {CPUArch, getArch} from '../src/arch'
2+
import os from 'os'
3+
4+
test.concurrent('Return either x64 or arm64 architecture', async () => {
5+
const archString = os.arch()
6+
let expected: CPUArch
7+
switch (archString) {
8+
case 'x64':
9+
expected = CPUArch.x86_64
10+
break
11+
case 'arm64':
12+
expected = CPUArch.arm64
13+
break
14+
default:
15+
await expect(getArch()).rejects.toThrow(
16+
`Unsupported architecture: ${archString}`
17+
)
18+
return
19+
}
20+
21+
const detectedArch = await getArch()
22+
expect(detectedArch).toBe(expected)
23+
})

__tests__/links/linux-links.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ test.concurrent(
1616
'Linux Cuda version to URL map contains valid URLs',
1717
async () => {
1818
for (const version of LinuxLinks.Instance.getAvailableLocalCudaVersions()) {
19-
const url: URL = LinuxLinks.Instance.getLocalURLFromCudaVersion(version)
19+
const url: URL =
20+
await LinuxLinks.Instance.getLocalURLFromCudaVersion(version)
2021
expect(url).toBeInstanceOf(URL)
2122
}
2223
}

__tests__/links/windows-links.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ test.concurrent(
1616
'Windows Cuda version to URL map contains valid URLs',
1717
async () => {
1818
for (const version of WindowsLinks.Instance.getAvailableLocalCudaVersions()) {
19-
const url: URL = WindowsLinks.Instance.getLocalURLFromCudaVersion(version)
19+
const url: URL =
20+
await WindowsLinks.Instance.getLocalURLFromCudaVersion(version)
2021
expect(url).toBeInstanceOf(URL)
2122
}
2223
}

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inputs:
55
cuda:
66
description: 'Cuda version'
77
required: false
8-
default: '12.6.1'
8+
default: '12.8.0'
99
sub-packages:
1010
description: 'Only installs specified subpackages, must be in the form of a JSON array. For example, if you only want to install nvcc and visual studio integration: ["nvcc", "visual_studio_integration"] double quotes required! Note that if you want to use this on Linux, ''network'' method MUST be used.'
1111
required: false

dist/index.js

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

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cuda-toolkit",
3-
"version": "0.2.20",
3+
"version": "0.2.21",
44
"description": "GitHub Action to install the NVIDIA CUDA Toolkit",
55
"main": "lib/main.js",
66
"scripts": {

0 commit comments

Comments
 (0)