Skip to content

Commit a83864c

Browse files
committed
update gh actions docs
1 parent 210dbc3 commit a83864c

File tree

1 file changed

+49
-8
lines changed

1 file changed

+49
-8
lines changed

resources/github-actions.md

+49-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: GitHub Actions
1010

1111
## Overview
1212

13-
Details on the self-hosted GitHub Actions runners provided by the RAPIDS Ops team.
13+
The RAPIDS team is in the process of migrating from Jenkins to GitHub Actions for CI/CD. The page below outlines some helpful information pertaining to the implementation of GitHub Actions provided by the RAPIDS Ops team. The official GitHub documentation for GitHub Actions is also useful and can be viewed [here](https://docs.github.com/en/actions).
1414

1515
### Intended audience
1616

@@ -20,7 +20,48 @@ Operations
2020
Developers
2121
{: .label .label-green}
2222

23-
## Details
23+
## Implementation
24+
25+
The RAPIDS Ops team provides GPU enabled self-hosted runners for use with GitHub Actions to the RAPIDS and other select GitHub organizations.
26+
27+
To ensure proper usage of these GPU enabled CI machines, the RAPIDS Ops team has adopted a strategy known as _Marking code as trusted by pushing upstream_ which is described in [this CircleCI blog post](https://circleci.com/blog/triggering-trusted-ci-jobs-on-untrusted-forks/).
28+
29+
The gist of the strategy is that the source code from trusted pull requests can be copied to a prefixed branch (e.g. `pull-request/<PR_NUMBER>`) within the source repository and CI can be configured to test only those prefixed branches rather than the pull requests themselves.
30+
31+
Pull requests authored by members of the given GitHub organization are considered trusted and therefore are copied to a `pull-request/*` branch for testing automatically.
32+
33+
Pull requests from authors outside of the GitHub organization must first be reviewed by a repository member with `write` permissions (or greater) to ensure that the code changes are legitimate and benign. That reviewer must leave an `/ok to test` (or `/okay to test`) comment on the pull request before it's code is copied to a `pull-request/*` branch for testing.
34+
35+
The `/ok to test` comment is only valid for a single commit. Subsequent commits must be re-reviewed and validated with another `/ok to test` comment.
36+
37+
### Ignoring Pull Request Branches in `git`
38+
39+
One consequence of the strategy described above is that a lot of `pull-request/*` branches will be created and deleted in GitHub as pull requests are opened and closed. To avoid having these branches fetched locally, you can run the following `git config` command, where `upstream` in `remote.upstream.fetch` is the `git` remote name corresponding to the source repository:
40+
41+
```sh
42+
git config \
43+
--global \
44+
--add "remote.upstream.fetch" \
45+
'^refs/heads/pull-request/*'
46+
```
47+
48+
### Skipping CI for Commits
49+
50+
See the GitHub Actions document page below on how to prevent GitHub Actions from running on certain commits. This is useful for preventing GitHub Actions from running on pull requests that are not fully complete. This also helps preserve the finite GPU resources provided by the RAPIDS Ops team.
51+
52+
With GitHub Actions, it is not possible to configure all commits for a pull request to be skipped. It must be specified at the commit level.
53+
54+
**Link**: [https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs](https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs)
55+
56+
### Rerunning Failed GitHub Actions
57+
58+
See the GitHub Actions documentation page below on how to rerun failed workflows. In addition to rerunning an entire workflow, GitHub Actions also provides the ability to rerun only the failed jobs in a workflow.
59+
60+
At this time there are no alternative ways to rerun tests with GitHub Actions beyond what is described in the documentation (e.g. there is no `rerun tests` comment for GitHub Actions).
61+
62+
**Link**: [https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs)
63+
64+
## Self-Hosted Runners
2465

2566
The RAPIDS Ops team provides a set of self-hosted runners that can be used in GitHub Action workflows throughout supported organizations. The tables below outline the labels that can be utilized and their related specifications.
2667

@@ -48,13 +89,13 @@ The GPU labeled runners are backed by lab machines and have the GPUs specified i
4889

4990
**IMPORTANT**: GPU jobs have two requirements: 1) They **must** run in a container (i.e. `nvidia/cuda:11.5.0-base-ubuntu18.04`) and 2) They must set the {% raw %}`NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}`{% endraw %} container environment variable. If these requirements aren't met, the GitHub Actions job will fail. See the _Usage_ section below for an example.
5091

51-
| Label Combination | GPU | Driver Version | # of GPUs |
52-
| -------------------------------- | ----------| -------------- | --------- |
53-
| `[linux, amd64, gpu-v100-450-1]` | `V100` | `450` | `1` |
54-
| `[linux, amd64, gpu-v100-495-1]` | `V100` | `495` | `1` |
55-
| `[linux, arm64, gpu-a100-495-1]` | `A100` | `495` | `1` |
92+
| Label Combination | GPU | Driver Version | # of GPUs |
93+
| -------------------------------- | ------ | -------------- | --------- |
94+
| `[linux, amd64, gpu-v100-450-1]` | `V100` | `450` | `1` |
95+
| `[linux, amd64, gpu-v100-495-1]` | `V100` | `495` | `1` |
96+
| `[linux, arm64, gpu-a100-495-1]` | `A100` | `495` | `1` |
5697

57-
## Usage
98+
### Usage
5899

59100
The code snippet below shows how the labels above may be utilized in a GitHub Action workflow.
60101

0 commit comments

Comments
 (0)