From b6306b611c44d4f7d0326238669e30f0897d62be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Mon, 7 Sep 2020 12:34:52 +0200 Subject: [PATCH 1/9] add tests --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e1ea0047..b207a0768 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,9 +13,30 @@ on: [push] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - + # This job builds wheels for x86_64 arch + testtag: + runs-on: ubuntu-latest + container: + image: quay.io/pypa/manylinux2014_x86_64 + env: + PLAT: manylinux2014_x86_64 + steps: + - name: Test01 + run: echo "01" + on: + push: + tags: + - '*' + - name: Test02 + run: echo "02 $github.ref" + - name: Test03 + run: echo "03" + if: github.ref != 'refs/tags/*' + - name: End tests + run: exit 1 # This job builds wheels for Windows x86_64 arch build-windows-x86_64: + needs: testtag runs-on: windows-latest strategy: matrix: @@ -49,6 +70,7 @@ jobs: # This job builds wheels for macOS x86_64 arch build-macos-x86_64: + needs: testtag runs-on: macos-latest strategy: matrix: @@ -88,6 +110,7 @@ jobs: # This job builds wheels for x86_64 arch build-linux-x86_64: + needs: testtag runs-on: ubuntu-latest container: image: quay.io/pypa/manylinux2014_x86_64 @@ -129,6 +152,7 @@ jobs: # This job builds wheels for armhf arch build-linux-armhf: + needs: testtag runs-on: luxonis-armhf container: registry.gitlab.com/luxonis/depthai-crosscompile/debian-buster steps: @@ -195,7 +219,10 @@ jobs: # Deploy to PyPi. Only when a commit is tagged deploy-pypi: - if: github.ref == 'refs/tags/*' + on: + push: + tags: + - '*' runs-on: ubuntu-latest needs: tests steps: From fa43a08f9c9ba7f3f57a4789786a8b7b01e9d467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Mon, 7 Sep 2020 12:41:03 +0200 Subject: [PATCH 2/9] add tests #2 --- .github/workflows/main.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b207a0768..1adb2f1c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,10 +23,6 @@ jobs: steps: - name: Test01 run: echo "01" - on: - push: - tags: - - '*' - name: Test02 run: echo "02 $github.ref" - name: Test03 @@ -34,6 +30,19 @@ jobs: if: github.ref != 'refs/tags/*' - name: End tests run: exit 1 + testtag2: + runs-on: ubuntu-latest + on: + push: + tags: + - '*' + container: + image: quay.io/pypa/manylinux2014_x86_64 + env: + PLAT: manylinux2014_x86_64 + steps: + - name: Test01 + run: echo "01" # This job builds wheels for Windows x86_64 arch build-windows-x86_64: needs: testtag From 7a12b3ce1bc024de728ef24a134d032095c3d23c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Mon, 7 Sep 2020 12:41:35 +0200 Subject: [PATCH 3/9] remove "on" --- .github/workflows/main.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1adb2f1c6..a59af73a0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,19 +30,6 @@ jobs: if: github.ref != 'refs/tags/*' - name: End tests run: exit 1 - testtag2: - runs-on: ubuntu-latest - on: - push: - tags: - - '*' - container: - image: quay.io/pypa/manylinux2014_x86_64 - env: - PLAT: manylinux2014_x86_64 - steps: - - name: Test01 - run: echo "01" # This job builds wheels for Windows x86_64 arch build-windows-x86_64: needs: testtag @@ -228,10 +215,6 @@ jobs: # Deploy to PyPi. Only when a commit is tagged deploy-pypi: - on: - push: - tags: - - '*' runs-on: ubuntu-latest needs: tests steps: From 9ee2e299418af9c677b6c69574259a0ba2564e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Mon, 7 Sep 2020 12:43:14 +0200 Subject: [PATCH 4/9] fix echo --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a59af73a0..93fb0fbd3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - name: Test01 run: echo "01" - name: Test02 - run: echo "02 $github.ref" + run: echo "02 ${github.ref}" - name: Test03 run: echo "03" if: github.ref != 'refs/tags/*' From f72ebd0a29e07e2343a75c7e4285168bdfe5c23d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Mon, 7 Sep 2020 12:44:50 +0200 Subject: [PATCH 5/9] add new check --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93fb0fbd3..bdeda12b8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,11 +23,9 @@ jobs: steps: - name: Test01 run: echo "01" - - name: Test02 - run: echo "02 ${github.ref}" - name: Test03 run: echo "03" - if: github.ref != 'refs/tags/*' + if: startsWith(github.ref, 'refs/tags/v') - name: End tests run: exit 1 # This job builds wheels for Windows x86_64 arch From dbd9317833f449af73493a472c0093760f0e58ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Mon, 7 Sep 2020 12:46:13 +0200 Subject: [PATCH 6/9] test #3 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bdeda12b8..d3737f9d1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: run: echo "01" - name: Test03 run: echo "03" - if: startsWith(github.ref, 'refs/tags/v') + if: !startsWith(github.ref, 'refs/tags/v') - name: End tests run: exit 1 # This job builds wheels for Windows x86_64 arch From 34d4352ecf2146ff4640d3f8d1f13460d5f35448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Mon, 7 Sep 2020 12:48:54 +0200 Subject: [PATCH 7/9] test #4 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d3737f9d1..d233b3e10 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: run: echo "01" - name: Test03 run: echo "03" - if: !startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') != true - name: End tests run: exit 1 # This job builds wheels for Windows x86_64 arch From b6f4bbc8c6c2c5605c1aa6eb9bf46aaacf9c5c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Mon, 7 Sep 2020 12:51:06 +0200 Subject: [PATCH 8/9] test final --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d233b3e10..7347fc434 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,7 +83,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Append build hash if not a tagged commit - if: github.ref != 'refs/tags/*' + if: startsWith(github.ref, 'refs/tags/v') != true run: echo '::set-env name=BUILD_COMMIT_HASH::${{github.sha}}' - name: Install dependencies run: | @@ -213,6 +213,7 @@ jobs: # Deploy to PyPi. Only when a commit is tagged deploy-pypi: + if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest needs: tests steps: From 6f1d1f873f16dbbfb2e3e7849cd16279f90f348a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Mon, 7 Sep 2020 12:51:46 +0200 Subject: [PATCH 9/9] remove testtag job --- .github/workflows/main.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7347fc434..6a336a600 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,24 +13,8 @@ on: [push] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This job builds wheels for x86_64 arch - testtag: - runs-on: ubuntu-latest - container: - image: quay.io/pypa/manylinux2014_x86_64 - env: - PLAT: manylinux2014_x86_64 - steps: - - name: Test01 - run: echo "01" - - name: Test03 - run: echo "03" - if: startsWith(github.ref, 'refs/tags/v') != true - - name: End tests - run: exit 1 # This job builds wheels for Windows x86_64 arch build-windows-x86_64: - needs: testtag runs-on: windows-latest strategy: matrix: @@ -64,7 +48,6 @@ jobs: # This job builds wheels for macOS x86_64 arch build-macos-x86_64: - needs: testtag runs-on: macos-latest strategy: matrix: @@ -104,7 +87,6 @@ jobs: # This job builds wheels for x86_64 arch build-linux-x86_64: - needs: testtag runs-on: ubuntu-latest container: image: quay.io/pypa/manylinux2014_x86_64 @@ -146,7 +128,6 @@ jobs: # This job builds wheels for armhf arch build-linux-armhf: - needs: testtag runs-on: luxonis-armhf container: registry.gitlab.com/luxonis/depthai-crosscompile/debian-buster steps: