Skip to content

Commit

Permalink
Add github action (#76)
Browse files Browse the repository at this point in the history
* Create ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml
  • Loading branch information
BichengYing authored Mar 15, 2021
1 parent 3d606f7 commit 5619310
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Continuous Integration

on: [push]

jobs:
ubuntu-unit-test:

runs-on: ubuntu-18.04
strategy:
matrix:
mpi-vendor: ['openmpi', 'mpich']
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install MPI
run: ./scripts/install_mpi.sh ${{ matrix.mpi-vendor }}
- name: Install BlueFog
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
git submodule update --init --recursive
python -m pip install -e .
- name: Unit Test
run: make test_torch_basic test_torch_ops

macos-unit-test:

runs-on: macos-10.15
strategy:
matrix:
mpi-vendor: ['openmpi', 'mpich']
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install MPI
run: ./scripts/install_mpi.sh ${{ matrix.mpi-vendor }}
- name: Install BlueFog
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
git submodule update --init --recursive
python -m pip install -e .
- name: Unit Test
run: NUM_PROC=2 make test_torch_basic test_torch_ops test_torch_win_ops

0 comments on commit 5619310

Please sign in to comment.