Skip to content

PR: Avoid iterating over non-dict objects if conda responds with errors #5750

PR: Avoid iterating over non-dict objects if conda responds with errors

PR: Avoid iterating over non-dict objects if conda responds with errors #5750

Workflow file for this run

# Based on https://github.com/tlambert03/napari/blob/master/.github/workflows/make_bundle.yml
on:
pull_request:
paths:
- 'installers/Windows/**'
- '.github/workflows/installer-win.yml'
- 'requirements/*.yml'
- 'MANIFEST.in'
- '**.bat'
- '**.py'
- '**.sh'
- '!**.md'
- '!installers/macOS/**'
- '!installers-conda/**'
- '!.github/workflows/installer-macos.yml'
- '!.github/workflows/installers-conda.yml'
release:
types:
- created
workflow_dispatch:
concurrency:
group: installer-win-${{ github.ref }}
cancel-in-progress: true
name: Create Windows Installer
env:
IS_PRE: ${{ github.event_name == 'workflow_dispatch' }}
IS_STANDARD_PR: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: Windows installer
runs-on: windows-latest
strategy:
matrix:
build_type: ['Lite', 'Full']
env:
UNWANTED_PACKAGES: ${{github.event_name == 'pull_request' && 'pip spyder-kernels python-slugify Rtree QDarkStyle PyNaCl psutil' || 'pip python-slugify Rtree PyNaCl psutil' }}
SKIP_PACKAGES: 'bcrypt slugify'
ADD_PACKAGES: ${{github.event_name == 'pull_request' && 'spyder_kernels blib2to3 _black_version blackd rtree qdarkstyle nacl psutil' || 'blib2to3 _black_version blackd rtree nacl psutil' }}
PYNSIST_REQ: pynsist==2.7
EXTRA_FLAG: ${{ matrix.build_type == 'Full' && github.event_name == 'pull_request' && '-ep installers/Windows/req-extras-pull-request.txt' || matrix.build_type == 'Lite' && github.event_name == 'pull_request' && '-ep installers/Windows/req-pull-request.txt' || matrix.build_type == 'Full' && '-ep installers/Windows/req-extras-release.txt' || '-ep installers/Windows/req-release.txt' }}
SUFFIX_FLAG: ${{ matrix.build_type == 'Lite' && '-s lite' || '-s full' }}
TEMPLATE_FAG: '-t installers/Windows/assets/nsist/spyder.nsi'
EXE_NAME: ${{ matrix.build_type == 'Lite' && github.event_name == 'pull_request' && 'Spyder_64bit_lite.exe' || matrix.build_type == 'Lite' && 'Spyder_64bit_lite.exe' || 'Spyder_64bit_full.exe' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.8.10
- name: Install yarg
shell: bash -l {0}
run: |
python -m pip install yarg
- name: Run script
shell: bash -l {0}
run: |
python installers/Windows/installer.py 3.8.10 64 setup.py spyder.app.start:main spyder img_src/spyder.ico LICENSE.txt ${EXTRA_FLAG} ${SUFFIX_FLAG} ${TEMPLATE_FAG}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: dist/${{ env.EXE_NAME }}
name: ${{ env.EXE_NAME }}
- name: Get Release
if: ${{github.event_name == 'release'}}
id: get_release
env:
GITHUB_TOKEN: ${{ github.token }}
uses: bruceadams/get-release@v1.2.0
- name: Upload Release Asset
if: ${{github.event_name == 'release'}}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: dist/${{ env.EXE_NAME }}
asset_name: ${{ env.EXE_NAME }}
asset_content_type: application/vnd.microsoft.portable-executable