build 3.8 #112
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: 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: false | |
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' | |
- 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' | |
include: | |
- python-version-minor: '8' | |
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: 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'}} | |
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'}} | |
run: | | |
pip install netCDF4==1.6.2 | |
- name: finish build on python >3.8 | |
if: ${{ matrix.python-version-minor != '8'}} | |
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'}} | |
run: | | |
cat .gitignore_extra >> .gitignore | |
pip install numpy==${{matrix.numpy-version}} build==1.2.2.post1 ninja meson setuptools 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 | |