add rapids infra ci #329
Workflow file for this run
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: jax | |
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] | |
jax-version: ["~=0.3.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 Jax Version | |
run: | | |
echo "jax[cpu]${{ matrix.jax-version }}" > requirements/jax.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-jax -- $branch |