From 5caaf397a81d64bc3534779769f9708f1868a493 Mon Sep 17 00:00:00 2001 From: Jianjie Liu Date: Mon, 16 Aug 2021 19:43:13 +0000 Subject: [PATCH 1/3] Add gpu build --- .github/workflows/pr-gate.yml | 41 ++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index 3e0d6bd7c5..0bf003feed 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -6,7 +6,7 @@ name: pr-gate on: push: - branches: [ laserprec/ghaction-ci, laserprec/ghaction-sandbox* ] + branches: [ laserprec/gpu-ci, laserprec/ghaction-sandbox* ] # This file defines following CI workflow: # @@ -20,7 +20,7 @@ on: # │ └─────────┘ │ # │ ┌─────────┐ │ # └─► build* ├─┘ -# │ (gpu) │ <-- TODO: Coming Soon +# │ (gpu) │ # └─────────┘ # .... # *each runs in PARALLEL the different combinations @@ -135,12 +135,47 @@ jobs: name: code-cov path: .coverage* +############################################### +################# GPU-BUILD ################# +############################################### + build-gpu: + runs-on: [self-hosted, Linux, gpu] # this is a union of labels to select specific self-hosted machine + needs: static-analysis + strategy: + matrix: + python: [3.6] + # different kind of tests are located in tests/ folders + test-kind: ['unit'] + # pytest markers configured in tox.ini. See https://docs.pytest.org/en/6.2.x/example/markers.html + test-marker: ['gpu and notebooks and not spark', 'gpu and not notebooks and not spark'] + + steps: + - uses: actions/checkout@v2 + + ################# Run Python tests ################# + - name: Use Python ${{ matrix.python }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + + - name: Run ${{ matrix.test-kind }} tests ('${{ matrix.test-marker }}') + uses: ./.github/workflows/actions/run-tests + with: + test-kind: ${{ matrix.test-kind }} + test-marker: ${{ matrix.test-marker }} + + - name: Upload Code Coverage + uses: actions/upload-artifact@v2 + with: + name: code-cov + path: .coverage* + ############################################### ############ TEST COVERAGE SUMMARY ############ ############################################### collect-code-cov: runs-on: ubuntu-latest - needs: [build-cpu, build-spark] + needs: [build-cpu, build-spark, build-gpu] steps: - uses: actions/checkout@v2 - name: Setup Python From 4fdbdda3de2cc3be6a12bcf3be2504fc31f301fd Mon Sep 17 00:00:00 2001 From: Jianjie Liu Date: Tue, 17 Aug 2021 18:43:01 +0000 Subject: [PATCH 2/3] Configure codecov PR comment format --- .github/.codecov.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/.codecov.yml b/.github/.codecov.yml index 6ebcb2c36a..b9d18eef73 100644 --- a/.github/.codecov.yml +++ b/.github/.codecov.yml @@ -2,7 +2,4 @@ # For more details, please see: # https://docs.codecov.com/docs/pull-request-comments#section-behavior comment: - behavior: new - layout: "sunburst, diff, files" - require_head: no - require_base: no \ No newline at end of file + behavior: new \ No newline at end of file From 7dc915e7f05715883183e1fcf48b254ee096e121 Mon Sep 17 00:00:00 2001 From: Jianjie Liu Date: Tue, 17 Aug 2021 18:43:49 +0000 Subject: [PATCH 3/3] Add PR trigger for main and staging branches --- .github/workflows/pr-gate.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index 0bf003feed..953b31fc6f 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -5,6 +5,9 @@ name: pr-gate on: + pull_request: + branches: [ staging, main ] + # development triggers can be removed afterwards. push: branches: [ laserprec/gpu-ci, laserprec/ghaction-sandbox* ]