Adapt all icon file paths to new location #232
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Jobs | |
on: [push, pull_request] | |
jobs: | |
job_1: | |
runs-on: ${{ matrix.os }} | |
name: Build | |
strategy: | |
fail-fast: false # complete remaining jobs | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
python-version: ["3.10", "3.11"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 # use the latest code commit | |
- name: Setup conda with python ${{ matrix.python-version }} | |
uses: s-weigand/setup-conda@v1 | |
with: | |
update-conda: false | |
python-version: ${{ matrix.python-version }} | |
- name: Initialize powershell for conda (Windows only) | |
if: runner.os == 'Windows' | |
run: conda init powershell | |
- name: Install dependencies with conda | |
run: | | |
# conda install numpy -y | |
# conda install conda-build setuptools setuptools_scm pandas pyqt xlsxwriter openpyxl -y | |
# Limit cx_freeze to a functioning version. Each new release | |
# seems to cause issues with the dlls for mkl and numpy | |
# conda install -c conda-forge "cx_freeze>=6.14,<6.15" -y | |
# There is an issue where python 3.12 always seems to be pinned as a dependency | |
# Including the actually used python version in the install command works | |
conda install python=${{ matrix.python-version }} numpy conda-build setuptools setuptools_scm pandas pyqt xlsxwriter openpyxl cx_freeze -c conda-forge -y | |
- name: Build & install lpagg with conda | |
run: | | |
conda build conda.recipe -c conda-forge | |
conda install lpagg --use-local -c conda-forge | |
- name: Build MSI installer for 'simultaneity' GUI version (Windows only) | |
if: runner.os == 'Windows' # Only applies to windows | |
run: | | |
conda activate base # Activate conda environment | |
python setup_exe.py bdist_msi | |
- name: Build MSI installer for 'dwd2trnsys' GUI version (Windows only) | |
if: runner.os == 'Windows' # Only applies to windows | |
run: | | |
conda activate base # Activate conda environment | |
conda install geopy -y | |
python setup_d2t_exe.py bdist_msi | |
- name: Upload 'simultaneity' windows msi installer artifact | |
if: runner.os == 'Windows' # Only applies to windows | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gleichzeitigkeit-msi-python${{ matrix.python-version }} | |
path: dist/Gleichzeitigkeit*.msi | |
- name: Upload 'dwd2trnsys' windows msi installer artifact | |
if: runner.os == 'Windows' # Only applies to windows | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dwd2trnsys-msi-python${{ matrix.python-version }} | |
path: dist/dwd2trnsys*.msi | |
- name: Lint with flake8 | |
if: runner.os == 'Linux' # Only needs to run once | |
run: | | |
conda install flake8 | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |