-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sarah Yurick <[email protected]>
- Loading branch information
1 parent
c89c115
commit d560fe1
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Auto-Label for Write Access and Python Files | ||
on: | ||
pull_request: | ||
types: [opened] | ||
jobs: | ||
auto-label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the PR code | ||
uses: actions/checkout@v3 | ||
- name: Check if the PR author has write access | ||
id: write-access | ||
uses: octokit/[email protected] | ||
with: | ||
route: GET /repos/${{ github.repository }}/collaborators/${{ github.event.pull_request.user.login }}/permission | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
continue-on-error: true | ||
- name: Verify Python files are modified | ||
id: python-files | ||
run: | | ||
git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep '.py' || echo 'no-python' | ||
continue-on-error: true | ||
- name: Add label if conditions are met | ||
if: ${{ steps.write-access.outputs.permission == 'write' && steps.python-files.outputs.result != 'no-python' }} | ||
uses: actions-ecosystem/action-add-labels@v1 | ||
with: | ||
labels: "gpuci" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: "GPU CI/CD" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
- 'r**' | ||
types: [ labeled, synchronize ] | ||
|
||
jobs: | ||
gpu-test: | ||
runs-on: self-hosted | ||
if: ${{ github.event.label.name == 'gpuci' || github.event_name == 'synchronize' }} | ||
|
||
steps: | ||
- name: Run nvidia-smi test | ||
run: | | ||
whoami | ||
nvidia-smi | ||
- name: Checkout the PR code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install NeMo-Curator and PyTest | ||
run: | | ||
pip install wheel cython | ||
RAPIDS_NIGHTLY=1 pip install --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple ".[cuda12x]" | ||
pip install pytest | ||
- name: Verify installation | ||
run: | | ||
pip list | ||
- name: Run PyTests with GPU mark | ||
run: | | ||
python -m pytest -m gpu |