Skip to content

Separate workflows and add quality check workflow #8

Separate workflows and add quality check workflow

Separate workflows and add quality check workflow #8

name: Pytorch CUDA Tests
on:
pull_request:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: self-hosted
steps:
- name: Restore files ownership
run: docker run
--rm
--entrypoint /bin/bash
--env HOST_UID=`id -u`
--env HOST_GID=`id -g`
--volume $(pwd):/workspace/optimum-benchmark
--workdir /workspace/optimum-benchmark
ubuntu
-c 'chown -R ${HOST_UID}:${HOST_GID} /workspace/optimum-benchmark'
- name: Checkout
uses: actions/checkout@v2
- name: Run tests
run: docker run
--rm
--entrypoint /bin/bash
--gpus '"device=0,1"'
--volume $(pwd):/workspace/optimum-benchmark
--workdir /workspace/optimum-benchmark
optimum-benchmark-gpu
-c "pip install -e .[test,peft,diffusers] && pytest -k 'cuda_pytorch' -x"