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: diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml new file mode 100644 index 0000000000..e17d75c453 --- /dev/null +++ b/.github/workflows/test_build.yml @@ -0,0 +1,88 @@ +# 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: Test Build + +on: + pull_request: + branches: [develop] + types: [review_requested, ready_for_review] + paths-ignore: + - 'docs/**', + - 'website/**' + - 'vendor/**' + +jobs: + Windows-latest: + + runs-on: windows-latest + strategy: + matrix: + python-version: [3.7] + + 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: | + ./tools/create_env.ps1 + + - name: ๐Ÿ”จ Build + shell: pwsh + run: | + ./tools/build.ps1 + + Ubuntu-latest: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7] + + 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 + run: | + ./tools/create_env.sh + + - name: ๐Ÿ”จ Build + run: | + ./tools/build.sh + + # MacOS-latest: + + # runs-on: macos-latest + # strategy: + # matrix: + # python-version: [3.7] + + # 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 + # run: | + # ./tools/create_env.sh + + # - name: ๐Ÿ”จ Build + # run: | + # ./tools/build.sh \ No newline at end of file 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) { 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