Skip to content

conda python

conda python #118

Workflow file for this run

name: Build
on: [push, pull_request, workflow_dispatch]
jobs:
build_wheels:
name: Build wheels on windows python 3.${{ matrix.python-version-minor }} np ${{ matrix.numpy-version }}
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
python-version-minor: ['9', '10', '11', '12', '13'] #["9", "8", "10", "11", "12", "13"]
numpy-version: ['2.0', '2.1'] # ['1.23.5', '1.24', '1.25', '1.26', '2.0', '2.1']
exclude:
- python-version-minor: '8.5'
- python-version-minor: '9'
numpy-version: '2.1'
- python-version-minor: '12'
numpy-version: '1.25'
- python-version-minor: '12'
numpy-version: '1.24'
- python-version-minor: '12'
numpy-version: '1.23.5'
- python-version-minor: '13'
numpy-version: '1.25'
- python-version-minor: '13'
numpy-version: '1.24'
- python-version-minor: '13'
numpy-version: '1.23.5'
- python-version-minor: '13'
numpy-version: '1.26'
# - python-version-minor: '13'
- numpy-version: '2.0'
- python-version-minor: '12'
- python-version-minor: '13'
- python-version-minor: '9'
- python-version-minor: '10'
- python-version-minor: '11'
include:
- python-version-minor: '8.5'
numpy-version: '1.23.5'
# - python-version-minor: '8.5'
# numpy-version: '1.24'
# - numpy-version: '2.0'
# python-version-minor: '9'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.${{ matrix.python-version-minor }}
# uses: actions/setup-python@v5
# with:
# python-version: 3.${{matrix.python-version-minor}}
- name: Install mingw-w64 on Windows
if: ${{ runner.os == 'Windows' }}
uses: msys2/setup-msys2@v2
with:
install: mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-toolchain base-devel
# path-type: inherit
- name: Install hdf5 for python 3.8.5 deps
if: ${{ matrix.python-version-minor == '8.5'}}
uses: msys2/setup-msys2@v2
with:
install: mingw-w64-x86_64-hdf5
- name: Install older netcdf4 for python 3.8.5
if: ${{ matrix.python-version-minor == '8.5'}}
run: |
python -m pip install pip==24.2
# conda install
pip install netCDF4==1.6.2 contourpy==1.1.1 cycler==0.12.1 fonttools==4.55.3 importlib_metadata==8.5.0 joblib==1.4.2 llvmlite==0.39.1 matplotlib==3.6.2 numba==0.56.4 packaging==24.2 wheel==0.44.0
- name: finish build on python >3.8
if: ${{ matrix.python-version-minor != '8.5'}}
run: |
cat .gitignore_extra >> .gitignore
pip install numpy==${{matrix.numpy-version}} build==1.2.2.post1 ninja meson
cd src/pyraingen/fortran_daily
python -m numpy.f2py -c regionalised_dailyT.for -m regionalised_dailyT -I $PWD --fcompiler=gfortran --compiler=msvc --backend distutils
Get-ChildItem -Force -R
cd ../../..
python -m build
pip list
- name: finish build on python 3.8
if: ${{ matrix.python-version-minor == '8.5'}}
run: |
cat .gitignore_extra >> .gitignore
pip install numpy==${{matrix.numpy-version}} ninja meson setuptools==59.8.0 build # wheel
cd src/pyraingen/fortran_daily
python -m numpy.f2py -c regionalised_dailyT.for -m regionalised_dailyT --fcompiler=gnu95 --compiler=mingw32
Get-ChildItem -Force -R
cd ../../..
python -m build
pip list
- name: test install_1
run: |
pip install .
pip list
python -c "from pyraingen.regionaliseddailysim import regionaliseddailysim"
- name: test install
run: |
pip install ./dist/pyraingen-0.2.3-cp3${{matrix.python-version-minor}}-cp3${{matrix.python-version-minor}}-win_amd64.whl --force-reinstall
python -c "from pyraingen.regionaliseddailysim import regionaliseddailysim"
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-x86_64-windows-latest-python-3.${{matrix.python-version-minor}}
path: dist/
- name: Release
uses: softprops/action-gh-release@v1
with:
name: windows-latest
files: ./dist/pyraingen-0.2.3-cp3${{matrix.python-version-minor}}-cp3${{matrix.python-version-minor}}-win_amd64.whl
tag_name: windows-latest
fail_on_unmatched_files: true