intel fortran #129
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.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: '13' | |
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 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses : fortran-lang/setup-fortran@v1 | |
with: | |
version: '2023.2' | |
compiler: 'intel' | |
- 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: Set up Python > 3.8 | |
if: ${{ matrix.python-version-minor != '8'}} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.${{matrix.python-version-minor}} | |
- name: Install mingw-w64 on Windows | |
if: ${{ 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 | |
# path-type: inherit | |
# - name: Install gfortran | |
# if: ${{ matrix.python-version-minor != '8'}} | |
- name: Install hdf5 for python 3.8 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 | |
if: ${{ matrix.python-version-minor == '8'}} | |
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 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'}} | |
run: | | |
cat .gitignore_extra >> .gitignore | |
pip install numpy==${{matrix.numpy-version}} build==1.2.2.post1 ninja meson | |
cd src/pyraingen/fortran_daily | |
$env:FC = 'ifort' | |
$env:CC = 'cl' | |
python -m numpy.f2py -c regionalised_dailyT4.for -m regionalised_dailyT4 -I $PWD --fcompiler=gfortran --compiler=msvc --backend meson | |
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}} ninja meson setuptools==59.8.0 build # 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: test install_1 | |
run: | | |
pip install . | |
pip list | |
python -c "from pyraingen.regionaliseddailysim import regionaliseddailysim" | |
- name: test install | |
run: | | |
pip uninstall pyraingen -y | |
pip install ./dist/pyraingen-1.0.2-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-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 | |