From 5619310f57b5a49829278773012cb41a2680e8d9 Mon Sep 17 00:00:00 2001 From: YBC Date: Sun, 14 Mar 2021 19:46:23 -0700 Subject: [PATCH] Add github action (#76) * Create ci.yml * Update ci.yml * Update ci.yml * Update ci.yml --- .github/workflows/ci.yml | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..1dc2ca76 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 +