From b8ea63927e92b707f20419d06d51f35d410f9498 Mon Sep 17 00:00:00 2001 From: huangxinda Date: Mon, 2 Aug 2021 14:47:37 +0800 Subject: [PATCH] ci(mge): merge try-import automatically --- .github/workflows/ci-cpu.yml | 25 -------------- .github/workflows/ci-cuda.yml | 31 ----------------- .github/workflows/ci.yml | 64 +++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/ci-cpu.yml delete mode 100644 .github/workflows/ci-cuda.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci-cpu.yml b/.github/workflows/ci-cpu.yml deleted file mode 100644 index 895ee62a3..000000000 --- a/.github/workflows/ci-cpu.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: CI CPU - -on: - push: - branches: [master, try-import] - pull_request: - -jobs: - cpu-test: - runs-on: self-hosted - container: - image: localhost:5000/megengine-ci:latest - steps: - - name: Checkout MegEngine - uses: actions/checkout@v2 - - name: Checkout submodules - run: | - ./third_party/prepare.sh - ./third_party/install-mkl.sh - - name: Build MegEngine - run: ./ci/cmake.sh cpu - - name: Python test - run: ./ci/run_python_test.sh cpu - - name: C++ test - run: ./ci/run_cpp_test.sh cpu diff --git a/.github/workflows/ci-cuda.yml b/.github/workflows/ci-cuda.yml deleted file mode 100644 index 410882c24..000000000 --- a/.github/workflows/ci-cuda.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: CI GPU - -on: - push: - branches: [master, try-import] - pull_request: - -jobs: - gpu-test: - runs-on: self-hosted - container: - image: localhost:5000/megengine-ci:latest - volumes: - - /usr/local/cuda-10.1-libs:/usr/local/cuda-10.1-libs - options: --gpus all --shm-size 1g - env: - NCCL_LAUNCH_MODE: PARALLEL - - steps: - - name: Checkout MegEngine - uses: actions/checkout@v2 - - name: Checkout submodules - run: | - ./third_party/prepare.sh - ./third_party/install-mkl.sh - - name: Build MegEngine - run: ./ci/cmake.sh cuda - - name: Python test - run: ./ci/run_python_test.sh cuda - - name: C++ test - run: ./ci/run_cpp_test.sh cuda diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..7eba722ee --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,64 @@ +name: CI + +on: + push: + branches: [master, try-import] + pull_request: + +jobs: + cpu-test: + runs-on: self-hosted + container: + image: localhost:5000/megengine-ci:latest + steps: + - name: Checkout MegEngine + uses: actions/checkout@v2 + - name: Checkout submodules + run: | + ./third_party/prepare.sh + ./third_party/install-mkl.sh + - name: Build MegEngine + run: ./ci/cmake.sh cpu + - name: Python test + run: ./ci/run_python_test.sh cpu + - name: C++ test + run: ./ci/run_cpp_test.sh cpu + gpu-test: + runs-on: self-hosted + container: + image: localhost:5000/megengine-ci:latest + volumes: + - /usr/local/cuda-10.1-libs:/usr/local/cuda-10.1-libs + options: --gpus all --shm-size 1g + env: + NCCL_LAUNCH_MODE: PARALLEL + steps: + - name: Checkout MegEngine + uses: actions/checkout@v2 + - name: Checkout submodules + run: | + ./third_party/prepare.sh + ./third_party/install-mkl.sh + - name: Build MegEngine + run: ./ci/cmake.sh cuda + - name: Python test + run: ./ci/run_python_test.sh cuda + - name: C++ test + run: ./ci/run_cpp_test.sh cuda + auto-merge: + if: ${{ github.ref == 'refs/heads/try-import' }} + runs-on: ubuntu-latest + needs: [cpu-test, gpu-test] + steps: + - name: Checkout MegEngine + uses: actions/checkout@v2 + with: + fetch-depth: '0' + - name: Merge with master + run: | + git config user.name "megvii-mge" + git config user.email "megengine@megvii.com" + git fetch origin master + git checkout -b master origin/master + git rebase try-import + git push -- GitLab