Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Update poetry install commands #515

Closed
wants to merge 11 commits into from
31 changes: 20 additions & 11 deletions .github/workflows/poetry-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@ on:
jobs:
poetry-dev-build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os:
- 'ubuntu-20.04'
- 'ubuntu-18.04'
# - 'macos-10.15'
- 'macos-11.0'
- 'windows-2019'
- 'windows-latest'
python-version:
- '3.10'
fail-fast: false
steps:
- uses: actions/checkout@v2

Expand All @@ -39,20 +37,31 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install latest version of Poetry for Windows
if: matrix.os == 'windows-latest'
run: (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
- name: Install latest version of Poetry
run: pip install --upgrade poetry pip setuptools wheel
if: matrix.os != 'windows-latest'
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Add Poetry to PATH on Windows
if: matrix.os == 'windows-latest'
run: |
echo %USERPROFILE%\AppData\Roaming\Python\Scripts
set USERPROFILE
echo "%USERPROFILE%\AppData\Roaming\Python\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Get-Content -Path $env:GITHUB_PATH
shell: powershell
- name: Add Poetry to PATH
if: matrix.os != 'windows-latest'
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Get Poetry version
run: poetry --version

- name: Check pyproject.toml validity
run: poetry check --no-interaction

- name: install canary development dependencies (macos)
if: matrix.os == 'macos-11.0'
run: curl https://files.pythonhosted.org/packages/fe/0a/96e00caf7a4d9ce79c8eeac1ae3880833e11913e5719a85b259103bcb1c6/opencv_python-4.5.4.60-cp310-cp310-macosx_11_0_x86_64.whl > opencv_python-4.5.4.60-cp310-cp310-macosx_10_16_x86_64.whl && poetry run pip install opencv_python-4.5.4.60-cp310-cp310-macosx_10_16_x86_64.whl && poetry install --no-interaction

- name: install canary development dependencies (non macos)
if: matrix.os != 'macos-11.0'
- name: install canary development dependencies
run: poetry install --no-interaction

13 changes: 6 additions & 7 deletions .github/workflows/poetry-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- 'ubuntu-18.04'
python-version:
- '3.10'
fail-fast: false
steps:
- uses: actions/checkout@v2

Expand All @@ -30,19 +31,17 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: pip install --upgrade poetry pip setuptools wheel
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Add Poetry to $PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Get Poetry version
run: poetry --version

- name: Check pyproject.toml validity
run: poetry check --no-interaction

- name: install canary production dependencies (macos)
if: matrix.os == 'macos-11.0'
run: curl https://files.pythonhosted.org/packages/fe/0a/96e00caf7a4d9ce79c8eeac1ae3880833e11913e5719a85b259103bcb1c6/opencv_python-4.5.4.60-cp310-cp310-macosx_11_0_x86_64.whl > opencv_python-4.5.4.60-cp310-cp310-macosx_10_16_x86_64.whl && poetry run pip install opencv_python-4.5.4.60-cp310-cp310-macosx_10_16_x86_64.whl && poetry install --no-dev --no-interaction

- name: install canary production dependencies (non macos)
if: matrix.os != 'macos-11.0'
- name: install canary production dependencies
run: poetry install --no-dev --no-interaction