"runtime/rust/vscode:/vscode.git/clone" did not exist on "d8aada0bfdedd40d0743d30e77884f82820b23eb"
Unverified Commit 0372ed79 authored by Frank Lee's avatar Frank Lee Committed by GitHub
Browse files

[ci] update workflow trigger condition and support options (#691)

parent d7ecaf36
name: Compatibility Test name: Compatibility Test
on: workflow_dispatch on:
workflow_dispatch:
version:
type: choice
description: which version to test
required: true
options:
- all
- pytorch-cuda:1.9.0-11.1.1 # python 3.8
- pytorch-cuda:1.8.1-11.1.1 # python 3.8
- pytorch-cuda:1.7.1-11.0.3 # python 3.8
- pytorch-cuda:1.6.0-10.2 # python 3.6
jobs: jobs:
matrix_preparation:
name: Prepare Container List
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
[ "${{github.event.inputs.version}}" != "" ] && matrix="[\"frankleeeee/${{github.event.inputs.version}}\"]"
[ "${{github.event.inputs.version}}" == "" ] || [ "${{github.event.inputs.version}}" == "all" ] && \
matrix="[\"frankleeeee/pytorch-cuda:1.9.0-11.1.1\", \"frankleeeee/pytorch-cuda:1.8.1-11.1.1\", \"frankleeeee/pytorch-cuda:1.7.1-11.0.3\", \"frankleeeee/pytorch-cuda:1.6.0-10.2\"]"
echo $matrix
echo "::set-output name=matrix::{\"container\":$(echo $matrix)}"
build: build:
name: Test for PyTorch compatibility name: Test for PyTorch Compatibility
if: github.base_ref == 'main' && github.repository == 'hpcaitech/ColossalAI' needs: matrix_preparation
if: github.repository == 'hpcaitech/ColossalAI'
runs-on: [self-hosted, gpu] runs-on: [self-hosted, gpu]
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix: ${{fromJson(needs.matrix_preparation.outputs.matrix)}}
# pytorch-cuda:1.9.0-11.1.1 + Python 3.8
# pytorch-cuda:1.8.1-11.1.1 + Python 3.8
# pytorch-cuda:1.7.1-11.0.3 + Python 3.8
# pytorch-cuda:1.6.0-10.2 + Python 3.6
container: ["frankleeeee/pytorch-cuda:1.9.0-11.1.1",
"frankleeeee/pytorch-cuda:1.8.1-11.1.1",
"frankleeeee/pytorch-cuda:1.7.1-11.0.3",
"frankleeeee/pytorch-cuda:1.6.0-10.2"]
container: container:
image: ${{ matrix.container }} image: ${{ matrix.container }}
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10 options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
...@@ -27,7 +46,7 @@ jobs: ...@@ -27,7 +46,7 @@ jobs:
run: | run: |
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install -U pip setuptools wheel --user pip install -U pip setuptools wheel --user
pip install pytest tensorboard pip install pytest tensorboard transformers
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Colossal-AI - name: Install Colossal-AI
run: | run: |
...@@ -38,6 +57,3 @@ jobs: ...@@ -38,6 +57,3 @@ jobs:
PYTHONPATH=$PWD pytest tests PYTHONPATH=$PWD pytest tests
env: env:
DATA: /data/scratch/cifar-10 DATA: /data/scratch/cifar-10
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment