From de12d4166617040a6d746156f46cd885ebdc3137 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 5 Apr 2021 22:14:30 +0200 Subject: [PATCH 01/11] Create test_build.yml --- .github/workflows/test_build.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test_build.yml diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml new file mode 100644 index 0000000000..9f43378d63 --- /dev/null +++ b/.github/workflows/test_build.yml @@ -0,0 +1,29 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Build Python Package + +on: + pull_request: + branches: [develop] + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.7' + - name: Install Venv + shell: pwsh + run: | + ./tools/create_env.ps1 + + - name: Build + shell: pwsh + run: | + ./tools/build.ps1 From 2859aca17cd7ee95298087d834a9f869fde889f8 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 5 Apr 2021 22:21:25 +0200 Subject: [PATCH 02/11] add poetry to path before building --- tools/build.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/build.ps1 b/tools/build.ps1 index a6c76dfafb..412bb111c1 100644 --- a/tools/build.ps1 +++ b/tools/build.ps1 @@ -157,11 +157,12 @@ Write-Host "Reading Poetry ... " -NoNewline if (-not (Test-Path -PathType Container -Path "$($env:USERPROFILE)\.poetry\bin")) { Write-Host "NOT FOUND" -ForegroundColor Yellow Install-Poetry + Write-Host "INSTALLED" -ForegroundColor Cyan } else { Write-Host "OK" -ForegroundColor Green } - +$env:PATH = "$($env:PATH);$($env:USERPROFILE)\.poetry\bin" Write-Host ">>> " -NoNewline -ForegroundColor green Write-Host "Cleaning cache files ... " -NoNewline @@ -172,6 +173,7 @@ Write-Host "OK" -ForegroundColor green Write-Host ">>> " -NoNewline -ForegroundColor green Write-Host "Building OpenPype ..." + $out = & poetry run python setup.py build 2>&1 if ($LASTEXITCODE -ne 0) { From e1a37dcd6a16a2ea06c7b8e76b6ca4aafa953372 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 5 Apr 2021 22:36:11 +0200 Subject: [PATCH 03/11] add ubuntu test build --- .github/workflows/test_build.yml | 31 ++++++++++++++++++++++++++++--- tools/create_env.sh | 1 + 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 9f43378d63..5b0fa22533 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -1,23 +1,26 @@ # This workflow will upload a Python Package using Twine when a release is created # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries -name: Build Python Package +name: Test Build on: pull_request: branches: [develop] jobs: - build: + Windows-latest: runs-on: windows-latest + strategy: + matrix: + python-version: [3.7, 3.8] steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.7' + python-version: ${{ matrix.python-version }} - name: Install Venv shell: pwsh run: | @@ -27,3 +30,25 @@ jobs: shell: pwsh run: | ./tools/build.ps1 + + Ubuntu-latest: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Venv + run: | + apt-get install -y --no-install-recommends zlib + ./tools/create_env.sh + + - name: Build + run: | + ./tools/build.sh \ No newline at end of file diff --git a/tools/create_env.sh b/tools/create_env.sh index 6ca0731963..7bdb8503fd 100755 --- a/tools/create_env.sh +++ b/tools/create_env.sh @@ -172,6 +172,7 @@ main () { poetry run python -m pip install --upgrade pip poetry run pip install --force-reinstall setuptools poetry run pip install --force-reinstall wheel + poetry run python -m pip install --force-reinstall pip } main -3 From d5168d9e104a6ac34301b413537b8d1c52eee8db Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 5 Apr 2021 22:37:23 +0200 Subject: [PATCH 04/11] run install as sudo --- .github/workflows/test_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 5b0fa22533..6a075df21c 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -46,7 +46,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Venv run: | - apt-get install -y --no-install-recommends zlib + sudo apt-get install -y --no-install-recommends zlib ./tools/create_env.sh - name: Build From b1d7cfd7088793e8890b5d640d129aa750e84022 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 5 Apr 2021 22:38:53 +0200 Subject: [PATCH 05/11] remove zlib install for now --- .github/workflows/test_build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 6a075df21c..69aa0bcc02 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -13,7 +13,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: [3.7, 3.8] + python-version: [3.7] steps: - uses: actions/checkout@v2 @@ -46,7 +46,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Venv run: | - sudo apt-get install -y --no-install-recommends zlib ./tools/create_env.sh - name: Build From c976cc5949575a90bc6d12d96006e55fc20f2fb9 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 5 Apr 2021 22:51:03 +0200 Subject: [PATCH 06/11] add macos build test --- .github/workflows/test_build.yml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 69aa0bcc02..af605a10ca 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -16,17 +16,18 @@ jobs: python-version: [3.7] steps: - - uses: actions/checkout@v2 + - name: ๐Ÿš› Checkout Code + uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install Venv + - name: ๐Ÿงต Install Requirements shell: pwsh run: | ./tools/create_env.ps1 - - name: Build + - name: ๐Ÿ”จ Build shell: pwsh run: | ./tools/build.ps1 @@ -44,10 +45,31 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install Venv + - name: ๐Ÿงต Install Requirements run: | ./tools/create_env.sh - - name: Build + - name: ๐Ÿ”จ Build + run: | + ./tools/build.sh + + MacOS-latest: + + runs-on: macos-latest + strategy: + matrix: + python-version: [3.7] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: ๐Ÿงต Install Requirements + run: | + ./tools/create_env.sh + + - name: ๐Ÿ”จ Build run: | ./tools/build.sh \ No newline at end of file From 4c2e5de86fc1c8d55a6ad090c5e7b68215147c0c Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 5 Apr 2021 23:03:22 +0200 Subject: [PATCH 07/11] remove circleCI --- .circleci/config.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index f821749b08..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 2.1 - -jobs: - deploy-website: - docker: - - image: circleci/node:10.16 - - steps: - - checkout - - run: - name: Deploying to GitHub Pages - command: | - git config --global user.email "mkolar@users.noreply.github.com" - git config --global user.name "Website Deployment Script" - echo "machine github.com login mkolar password $GITHUB_TOKEN" > ~/.netrc - cd website && yarn install && GIT_USER=mkolar yarn run deploy - -workflows: - build_and_deploy: - jobs: From adad6ad5dc74a904f55d7c728441092b757a7420 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 5 Apr 2021 23:08:08 +0200 Subject: [PATCH 08/11] cosmetic changes. --- .github/workflows/test_build.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index af605a10ca..00cefb7feb 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -18,10 +18,12 @@ jobs: steps: - name: ๐Ÿš› Checkout Code uses: actions/checkout@v2 + - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: ๐Ÿงต Install Requirements shell: pwsh run: | @@ -40,11 +42,14 @@ jobs: python-version: [3.7] steps: - - uses: actions/checkout@v2 + - name: ๐Ÿš› Checkout Code + uses: actions/checkout@v2 + - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: ๐Ÿงต Install Requirements run: | ./tools/create_env.sh @@ -61,11 +66,14 @@ jobs: python-version: [3.7] steps: - - uses: actions/checkout@v2 + - name: ๐Ÿš› Checkout Code + uses: actions/checkout@v2 + - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: ๐Ÿงต Install Requirements run: | ./tools/create_env.sh From 93be156f6b2f1f08940a9a86d6bab5d1ddf26983 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 6 Apr 2021 21:31:03 +0200 Subject: [PATCH 09/11] limit build testing to reviewable PR only --- .github/workflows/test_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 00cefb7feb..cfc419137e 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -6,6 +6,7 @@ name: Test Build on: pull_request: branches: [develop] + types: [review_requested, ready_for_review] jobs: Windows-latest: From a64518a0f7024178a3ad75302764a402b341078a Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 6 Apr 2021 21:37:49 +0200 Subject: [PATCH 10/11] Comment out MacOS for now --- .github/workflows/test_build.yml | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index cfc419137e..5d35b77019 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -59,26 +59,26 @@ jobs: run: | ./tools/build.sh - MacOS-latest: + # MacOS-latest: - runs-on: macos-latest - strategy: - matrix: - python-version: [3.7] + # runs-on: macos-latest + # strategy: + # matrix: + # python-version: [3.7] - steps: - - name: ๐Ÿš› Checkout Code - uses: actions/checkout@v2 + # steps: + # - name: ๐Ÿš› Checkout Code + # uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + # - name: Set up Python + # uses: actions/setup-python@v2 + # with: + # python-version: ${{ matrix.python-version }} - - name: ๐Ÿงต Install Requirements - run: | - ./tools/create_env.sh + # - name: ๐Ÿงต Install Requirements + # run: | + # ./tools/create_env.sh - - name: ๐Ÿ”จ Build - run: | - ./tools/build.sh \ No newline at end of file + # - name: ๐Ÿ”จ Build + # run: | + # ./tools/build.sh \ No newline at end of file From bd0aaa1aa76858a822f3c0573a497a5a57bca85a Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 6 Apr 2021 21:42:37 +0200 Subject: [PATCH 11/11] ignore website and docs for build testing --- .github/workflows/test_build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 5d35b77019..e17d75c453 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -7,6 +7,10 @@ on: pull_request: branches: [develop] types: [review_requested, ready_for_review] + paths-ignore: + - 'docs/**', + - 'website/**' + - 'vendor/**' jobs: Windows-latest: