remove unused cmake configuration #162
This file contains hidden or 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] | |
| numpy-version: [2.1, 2.2] | |
| exclude: | |
| - python-version-minor: 9 | |
| numpy-version: 2.2 | |
| - python-version-minor: 9 | |
| numpy-version: 2.1 | |
| - python-version-minor: 12 | |
| numpy-version: 1.25 | |
| - numpy-version: 2.0 | |
| include: | |
| - python-version-minor: 8 | |
| numpy-version: 1.23.5 | |
| - numpy-version: 2.0 | |
| python-version-minor: 9 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ilammy/msvc-dev-cmd@v1 # to get cl.exe | |
| - name: Set up Python 3.8 | |
| if: ${{ matrix.python-version-minor == 8}} | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| python-version: 3.8.5 | |
| - name: Install older netcdf4 for python 3.8 | |
| if: ${{ matrix.python-version-minor == 8}} | |
| run: | | |
| python -m pip install pip==24.2 | |
| pip install netCDF4==1.6.2 contourpy==1.1.1 cycler==0.12.1 fonttools==4.55.3 joblib==1.4.2 llvmlite==0.39.1 matplotlib==3.6.2 numba==0.56.4 packaging==24.2 wheel==0.44.0 | |
| - name: Install hdf5 and mingw tools for python 3.8 deps | |
| if: ${{ matrix.python-version-minor == 8}} | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| install: mingw-w64-x86_64-hdf5 mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-toolchain base-devel | |
| - name: Set up Python > 3.11 | |
| if: ${{ matrix.python-version-minor > 11}} | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| python-version: 3.${{ matrix.python-version-minor }} | |
| - name: setup 3.8 < python < 3.12 | |
| if: ${{matrix.python-version-minor != 8 && matrix.python-version-minor <= 11}} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.${{matrix.python-version-minor}} | |
| - name: Install mingw-w64 on Windows for 3.8 < python < 3.12 | |
| if: ${{ matrix.python-version-minor <= 11 && matrix.python-version-minor != 8}} | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| install: mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-toolchain base-devel | |
| - name: Install dependencies for python > 3.11 | |
| if: ${{ matrix.python-version-minor > 11}} | |
| run: | | |
| conda config --add channels conda-forge | |
| pip install numpy==${{matrix.numpy-version}} build==1.2.2.post1 | |
| conda install -y meson gcc gfortran delvewheel | |
| - name: finish build on 3.8 < python < 3.12 | |
| if: ${{ matrix.python-version-minor <= 11 && matrix.python-version-minor != 8}} | |
| run: | | |
| pip install numpy==${{matrix.numpy-version}} build==1.2.2.post1 ninja meson delvewheel | |
| cd src/pyraingen/fortran_daily | |
| python -m numpy.f2py -c regionalised_dailyT4.for -m regionalised_dailyT4 -I $PWD --fcompiler=gfortran --compiler=msvc --backend distutils | |
| Get-ChildItem -Force -R | |
| cd ../../.. | |
| python -m build --wheel . | |
| - name: finish build on >3.11 | |
| if: ${{ matrix.python-version-minor > 11}} | |
| run: | | |
| cd src\pyraingen\fortran_daily | |
| $env:FC = "gfortran" | |
| $env:CC = "gcc" | |
| python -m numpy.f2py -m regionalised_dailyT4 -c regionalised_dailyT4.for -I $PWD | |
| cd ../../.. | |
| python -m build --wheel . | |
| - name: finish build on python 3.8 | |
| if: ${{ matrix.python-version-minor == 8}} | |
| run: | | |
| cat .gitignore_extra >> .gitignore | |
| pip install numpy==${{matrix.numpy-version}} ninja meson setuptools==59.8.0 build delvewheel # wheel | |
| cd src/pyraingen/fortran_daily | |
| python -m numpy.f2py -c regionalised_dailyT4.for -m regionalised_dailyT4 --fcompiler=gnu95 --compiler=mingw32 | |
| Get-ChildItem -Force -R | |
| cd ../../.. | |
| python -m build | |
| pip list | |
| - name: Fix Wheel filename | |
| run: | | |
| mv dist\pyraingen-1.0.2-py3-none-any.whl dist\pyraingen-1.0.2-cp3${{matrix.python-version-minor}}-cp3${{matrix.python-version-minor}}-win_amd64.whl | |
| - name: repair wheel to add dlls | |
| if: ${{ matrix.python-version-minor == 8 || matrix.python-version-minor > 11}} | |
| run: | | |
| delvewheel repair dist\pyraingen-1.0.2-cp3${{matrix.python-version-minor}}-cp3${{matrix.python-version-minor}}-win_amd64.whl -w dist/ | |
| - name: repair wheel to add dlls for python 3.9, 3.10, 3.11 | |
| if: ${{ matrix.python-version-minor != 8 && matrix.python-version-minor <= 11}} | |
| run: | | |
| delvewheel repair dist\pyraingen-1.0.2-cp3${{matrix.python-version-minor}}-cp3${{matrix.python-version-minor}}-win_amd64.whl -w dist/ --add-path $PWD\src\pyraingen\fortran_daily\regionalised_dailyT4\.libs | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: windows-latest | |
| files: ./dist/pyraingen-1.0.2-cp3${{matrix.python-version-minor}}-cp3${{matrix.python-version-minor}}-win_amd64.whl | |
| tag_name: windows-latest | |
| fail_on_unmatched_files: true |