Skip to content

Merge pull request #196 from CliMT/master #190

Merge pull request #196 from CliMT/master

Merge pull request #196 from CliMT/master #190

# This workflow will install compilers and packges on windows platform
name: windows package
on:
push:
branches: [ master, without-dycore ]
pull_request:
branches: [ master ]
jobs:
windows_package:
runs-on: windows-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
python-version: ${{ matrix.python-version }}
- shell: bash -l {0}
run: |
conda activate test
export COMPILER_PATH=$CONDA_PREFIX/Library/mingw-w64/bin/
export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables
which python
conda install -c msys2 m2w64-gcc m2w64-gcc-fortran m2w64-winpthreads-git m2w64-openblas
conda install libpython
which gcc
which gfortran
# Fix for m2w64 compilers
cp $COMPILER_PATH/x86_64-w64-mingw32-gcc-ar.exe $COMPILER_PATH/x86_64-w64-mingw32-ar.exe
printf '[build]\r\ncompiler=mingw32\r\n' > $HOME/pydistutils.cfg
ls $HOME; cat $HOME/pydistutils.cfg
python -m pip install -r requirements_dev.txt
# Fix for runtime dlls
touch libmsvcr140.dll
cp $CONDA_PREFIX/Library/bin/vcruntime140.dll $CONDA_PREFIX/Library/bin/msvcr140.dll
ls -l
python setup.py develop
py.test -v
- if: ${{ github.event_name == 'release' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
conda activate test
export COMPILER_PATH=$CONDA_PREFIX/Library/mingw-w64/bin/
export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables
python setup.py bdist_wheel
python setup.py sdist
python -m pip install twine
twine upload dist/*