[Feat] support pr merge test ci #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pr_stage_test | |
on: | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
- 'README_zh-CN.md' | |
- 'docs/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_cu117: | |
runs-on: ubuntu-22.04 | |
container: | |
image: pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip | |
run: pip install pip --upgrade | |
- name: Fetch GPG keys | |
run: | | |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub | |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub | |
- name: Install Python-dev | |
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev | |
if: ${{matrix.python-version != 3.10}} | |
- name: Install system dependencies | |
run: | | |
apt-get update | |
apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev libc6 libc6-dev | |
- name: Install opencompass dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Build and install | |
run: pip install -e . | |
- name: Run demo test | |
run: | | |
python run.py --models hf_opt_125m hf_opt_350m --datasets siqa_gen winograd_ppl | |
build_windows: | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
platform: [cpu] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip | |
run: python -m pip install pip --upgrade | |
- name: Install PyTorch | |
run: pip install torch==1.13.1+${{matrix.platform}} -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html | |
- name: Install opencompass dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Build and install | |
run: pip install -e . | |
- name: Run demo test | |
run: | | |
python run.py --models hf_opt_125m hf_opt_350m --datasets siqa_gen winograd_ppl |