rapids infra ci activation (#385) #78
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
name: CPU CI (Post-merge) | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
cpu-ci-postmerge: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [3.8] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Ubuntu packages | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y protobuf-compiler | |
- name: Install and upgrade python packages | |
run: | | |
python -m pip install --upgrade pip setuptools==59.4.0 wheel tox | |
- name: Get Branch name | |
id: get-branch-name | |
uses: NVIDIA-Merlin/.github/actions/branch-name@main | |
- name: Run tests | |
run: | | |
branch="${{ steps.get-branch-name.outputs.branch }}" | |
tox -e test-cpu-postmerge -- $branch | |
- name: Building docs | |
run: | | |
tox -e docs | |
- name: Upload HTML | |
uses: actions/upload-artifact@v3 | |
with: | |
name: html-build-artifact | |
path: docs/build/html | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Store PR information | |
run: | | |
mkdir ./pr | |
echo ${{ github.event.number }} > ./pr/pr.txt | |
echo ${{ github.event.pull_request.merged }} > ./pr/merged.txt | |
echo ${{ github.event.action }} > ./pr/action.txt | |
- name: Upload PR information | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pr | |
path: pr/ | |
# If failures occur, notify in slack. | |
- name: Notify Failure in Slack | |
id: slack | |
uses: slackapi/[email protected] | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
with: | |
# This data can be any valid JSON from a previous step in the GitHub Action | |
payload: | | |
{ | |
"message": "GitHub Action job failure on github.ref `${{ github.ref }}`", | |
"pull_request": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}", | |
"workflow": "${{ github.workflow }}", | |
"logs_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
} | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |