Skip to content

add rapids infra ci #324

add rapids infra ci

add rapids infra ci #324

Workflow file for this run

---
name: torch
on:
workflow_dispatch:
push:
branches: [main]
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches: [main]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
torch-version: ["~=1.11.0", "~=1.12.0", "~=1.13.0"]
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 and upgrade python packages
run: |
python -m pip install --upgrade pip tox
- name: Set Torch Version
run: |
echo "torch${{ matrix.torch-version }}" > requirements/torch.txt
- name: Run Tests
run: |
ref_type=${{ github.ref_type }}
branch=main
if [[ $ref_type == "tag"* ]]
then
raw=$(git branch -r --contains ${{ github.ref_name }})
branch=${raw/origin\/}
fi
tox -e test-torch -- $branch