Skip to content

Commit

Permalink
Use matrix method/os in log suffix and add docs
Browse files Browse the repository at this point in the history
Make it clear that log-file-suffix is required in matrix builld in the README.md
  • Loading branch information
Jimver committed Jun 22, 2024
1 parent abe1e71 commit 60e386b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
uses: ./
with:
method: ${{matrix.method}}
log-file-suffix: '${{matrix.method}}-${{matrix.os}}'

- name: Run the action on this runner with nvcc and libcublas subpackages (Linux)
if: runner.os == 'Linux' && matrix.method == 'network'
Expand All @@ -73,15 +74,15 @@ jobs:
method: ${{matrix.method}}
sub-packages: '["nvcc"]'
non-cuda-sub-packages: '["libcublas"]'
log-file-suffix: 'nvcc-libcublas'
log-file-suffix: 'nvcc-libcublas-${{matrix.method}}-${{matrix.os}}'

- name: Run the action on this runner with nvcc subpackage only (Windows)
if: runner.os == 'Windows'
uses: ./
with:
method: ${{matrix.method}}
sub-packages: '["nvcc"]'
log-file-suffix: 'nvcc'
log-file-suffix: 'nvcc-${{matrix.method}}-${{matrix.os}}'

- name: Test if nvcc is available
run: nvcc -V
Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,31 @@ See the [Nvidia Docs](https://docs.nvidia.com/cuda/cuda-installation-guide-linux

Default: `'["--toolkit", "--samples"]'`.

### `log-file-suffix`

**Required with matrix builds**

Add suffix to the log file name which gets uploaded as an artifact. This **has** to be set when running a matrix build.
The log file already contains the OS type (Linux/Windows) and install method (local/network) but it is not aware of other matrix variables, so add those here.

For example if you use multiple linux distros:
```
jobs:
CI:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: Jimver/cuda-toolkit@master
id: cuda-toolkit
with:
log-file-suffix: '${{matrix.os}}.txt'
```

Default: `'log.txt'`

## Outputs

### `cuda`
Expand Down

0 comments on commit 60e386b

Please sign in to comment.