update github CI with the current workflow (#441)

pull/442/head
Frank Lee 2022-03-17 10:38:04 +08:00 committed by GitHub
parent 5a1e33b97f
commit 725a39f4bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 19 deletions

View File

@ -9,8 +9,7 @@ jobs:
name: Assign Reviewer for PR
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft == false &&
(github.base_ref == 'main' || github.base_ref == 'develop')
github.event.pull_request.draft == false && github.base_ref == 'main'
&& github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
&& toJson(github.event.pull_request.requested_reviewers) == '[]'
steps:

View File

@ -8,8 +8,8 @@ jobs:
build:
name: Build and Test Colossal-AI
if: |
github.event.pull_request.draft == false &&
(github.base_ref == 'main' || github.base_ref == 'develop') &&
github.event.pull_request.draft == false &&
github.base_ref == 'main' &&
github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI' &&
contains( github.event.pull_request.labels.*.name, 'Run Build and Test')
runs-on: [self-hosted, gpu]
@ -18,9 +18,6 @@ jobs:
options: --gpus all --rm --ipc=host -v /data/scratch/cifar-10:/data/scratch/cifar-10
timeout-minutes: 40
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: |
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

View File

@ -5,7 +5,7 @@ on: workflow_dispatch
jobs:
build:
name: Test for PyTorch compatibility
if: (github.base_ref == 'main' || github.base_ref == 'develop') && github.repository == 'hpcaitech/ColossalAI'
if: github.base_ref == 'main' && github.repository == 'hpcaitech/ColossalAI'
runs-on: [self-hosted, aws]
strategy:
fail-fast: false

View File

@ -4,8 +4,8 @@ on: workflow_dispatch
jobs:
build-n-publish:
if: (github.base_ref == 'main' || github.base_ref == 'develop') && github.repository == 'hpcaitech/ColossalAI' && contains('["FrankLeeeee", "ver217", "feifeibear", "kurisusnowdeng"]', github.actor)
name: Build and publish Python 🐍 distributions 📦 to PyPI or Test PyPI
if: github.base_ref == 'main' && github.repository == 'hpcaitech/ColossalAI' && contains('["FrankLeeeee", "ver217", "feifeibear", "kurisusnowdeng"]', github.actor)
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
@ -15,15 +15,7 @@ jobs:
python-version: '3.7.4'
# publish to PyPI if executed on the main branch
# publish to Test PyPI if executed on the develop branch
- name: Publish package to Test PyPI
if: github.base_ref == 'develop'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
verbose: true
- name: Publish package to PyPI
if: github.base_ref == 'main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__

24
.github/workflows/release_test.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Publish to Test PyPI
on: workflow_dispatch
jobs:
build-n-publish:
if: github.base_ref == 'main' && github.repository == 'hpcaitech/ColossalAI' && contains('["FrankLeeeee", "ver217", "feifeibear", "kurisusnowdeng"]', github.actor)
name: Build and publish Python 🐍 distributions 📦 to Test PyPI
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7.4'
# publish to PyPI if executed on the main branch
# publish to Test PyPI if executed on the develop branch
- name: Publish package to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true

View File

@ -13,7 +13,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'develop'
ref: 'main'
submodules: true
- name: echo