Skip to content

Commit

Permalink
Merge pull request #22 from mmp/add-versions
Browse files Browse the repository at this point in the history
Add links to more CUDA releases
  • Loading branch information
Jimver authored Nov 30, 2021
2 parents d78e616 + 7992109 commit 2db19f4
Show file tree
Hide file tree
Showing 8 changed files with 217 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ The path where cuda is installed (same as `CUDA_PATH` in `GITHUB_ENV`).

```yaml
steps:
- uses: Jimver/[email protected].4
- uses: Jimver/[email protected].5
id: cuda-toolkit
with:
cuda: '11.2.2'
cuda: '11.5.1'

- run: echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}"

Expand Down
12 changes: 12 additions & 0 deletions __tests__/links/get-links.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@ test.concurrent('getLinks gives a valid ILinks class', async () => {
links instanceof LinuxLinks || links instanceof WindowsLinks
).toBeTruthy()
})

test.concurrent('getLinks return same versions in same order', async () => {
const linuxLinks = LinuxLinks.Instance.getAvailableLocalCudaVersions()
const windowsLinks = WindowsLinks.Instance.getAvailableLocalCudaVersions()
const windowsNetworkLinks =
WindowsLinks.Instance.getAvailableNetworkCudaVersions()

expect(linuxLinks.length).toBe(windowsLinks.length)
expect(windowsLinks.length).toBe(windowsNetworkLinks.length)
expect(linuxLinks).toEqual(windowsLinks)
expect(windowsLinks).toEqual(windowsNetworkLinks)
})
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
cuda:
description: 'Cuda version'
required: false
default: '11.2.2'
default: '11.5.1'
sub-packages:
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.'
required: false
Expand Down
102 changes: 100 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cuda-toolkit",
"version": "0.2.4",
"version": "0.2.5",
"description": "GitHub Action to install the NVIDIA CUDA Toolkit",
"main": "lib/main.js",
"scripts": {
Expand Down
29 changes: 28 additions & 1 deletion src/links/linux-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ export class LinuxLinks extends AbstractLinks {
super()
// Map of cuda SemVer version to download URL
this.cudaVersionToURL = new Map([
[
'11.5.1',
'https://developer.download.nvidia.com/compute/cuda/11.5.1/local_installers/cuda_11.5.1_495.29.05_linux.run'
],
[
'11.5.0',
'https://developer.download.nvidia.com/compute/cuda/11.5.0/local_installers/cuda_11.5.0_495.29.05_linux.run'
],
[
'11.4.3',
'https://developer.download.nvidia.com/compute/cuda/11.4.3/local_installers/cuda_11.4.3_470.82.01_linux.run'
],
[
'11.4.2',
'https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run'
],
[
'11.4.1',
'https://developer.download.nvidia.com/compute/cuda/11.4.1/local_installers/cuda_11.4.1_470.57.02_linux.run'
],
[
'11.4.0',
'https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda_11.4.0_470.42.01_linux.run'
Expand All @@ -20,6 +40,10 @@ export class LinuxLinks extends AbstractLinks {
'11.3.1',
'https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run'
],
[
'11.3.0',
'https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux.run'
],
[
'11.2.2',
'https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run'
Expand All @@ -28,6 +52,10 @@ export class LinuxLinks extends AbstractLinks {
'11.2.1',
'https://developer.download.nvidia.com/compute/cuda/11.2.1/local_installers/cuda_11.2.1_460.32.03_linux.run'
],
[
'11.2.0',
'https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda_11.2.0_460.27.04_linux.run'
],
[
'11.1.1',
'https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run'
Expand Down Expand Up @@ -60,7 +88,6 @@ export class LinuxLinks extends AbstractLinks {
}

static get Instance(): LinuxLinks {
// Do you need arguments? Make it a regular static method instead.
return this._instance || (this._instance = new this())
}
}
Loading

0 comments on commit 2db19f4

Please sign in to comment.