mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-08-31 16:40:41 +00:00
added CI for unit testing (#69)
This commit is contained in:
40
.github/workflows/build.yml
vendored
Normal file
40
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Build
|
||||
on:
|
||||
pull_request:
|
||||
types: [review_requested]
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and test Colossal-AI
|
||||
runs-on: [self-hosted, gpu]
|
||||
container:
|
||||
image: nvcr.io/nvidia/pytorch:21.07-py3
|
||||
options: --gpus all --rm --ipc=host -v /data/cifar-10:/data/cifar-10
|
||||
timeout-minutes: 1200
|
||||
if: github.event.pull_request.draft == false && github.base_ref == 'main' && github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
|
||||
steps:
|
||||
- name: Setup Environment
|
||||
run: |
|
||||
export https_proxy=http://172.17.0.1:7890 http_proxy=http://172.17.0.1:7890 all_proxy=socks5://172.17.0.1:7890
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
python3 -m pip install -U pip setuptools wheel --user
|
||||
pip install pytest tensorboard deepspeed apex
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Colossal-AI
|
||||
run: |
|
||||
pip install -v --no-cache-dir --global-option="--cuda_ext" .
|
||||
- name: Unit Testing
|
||||
run: |
|
||||
pytest tests
|
||||
env:
|
||||
DATA: /data/cifar-10
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user