Skip to content

Gpu ci check #29172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/gpu-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Array API
on:
workflow_dispatch:
inputs:
pr_id:
description: Test the contents of this Pull Request
required: true

# XXX Temporary addition to execute workflow on pull requests, but only those
# that modify this file
# Remove before merging
pull_request:
paths:
- ".github/workflows/gpu-ci.yml"

permissions: read-all

jobs:
tests:
runs-on: GPU
name: Run Array API unit tests
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.12'
# change this to checkout a particular PR if a PR number is provided as input
- name: Checkout main repository
uses: actions/checkout@v2
- name: Checkout a particular Pull Request
if: inputs.pr_id
env:
PR_ID: ${{ inputs.pr_id }}
GH_TOKEN: ${{ github.token }}
run: |
echo "Checking out" ${{ env.PR_ID }}
gh pr checkout ${{ env.PR_ID }}
- name: Cache conda environment
id: cache-conda
uses: actions/cache@v3
env:
cache-name: cache-conda-env
with:
path: ~/conda
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('build_tools/github/pylatest_conda_forge_mkl_array-api_linux-64_conda.lock') }}
- name: Install miniforge
if: ${{ steps.cache-conda.outputs.cache-hit != 'true' }}
run: |
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh -b -p "${HOME}/conda"
source "${HOME}/conda/etc/profile.d/conda.sh"
rm Miniforge3-$(uname)-$(uname -m).sh
- name: Install dependencies
if: ${{ steps.cache-conda.outputs.cache-hit != 'true' }}
run: |
source "${HOME}/conda/etc/profile.d/conda.sh"
# defines the get_dep and show_installed_libraries functions
source build_tools/shared.sh
conda activate base
conda install -c conda-forge "$(get_dep conda-lock min)" -y
conda-lock install --name sklearn build_tools/github/pylatest_conda_forge_mkl_array-api_linux-64_conda.lock
- name: Install scikit-learn
run: |
source "${HOME}/conda/etc/profile.d/conda.sh"
conda activate sklearn
pip install --verbose --no-build-isolation --config-settings editable-verbose=true --editable .
- name: Run array API tests
run: |
source "${HOME}/conda/etc/profile.d/conda.sh"
conda activate sklearn
pytest -k 'array_api'
Loading
Loading