diff --git a/.github/workflows/release_climt.yml b/.github/workflows/release_climt.yml index 8d6ecb27..377b6344 100644 --- a/.github/workflows/release_climt.yml +++ b/.github/workflows/release_climt.yml @@ -32,7 +32,7 @@ jobs: - name: Build on Linux env: CIBW_BUILD: cp36-manylinux_x86_64 cp37-manylinux_x86_64 cp38-manylinux_x86_64 - CIBW_ENVIRONMENT: CC=gcc-7 FC=gfortran-7 CLIMT_ARCH=Linux + CIBW_ENVIRONMENT: "CC=gcc FC=gfortran CLIMT_ARCH=Linux" if: ${{ runner.os == 'Linux' }} run: python -m cibuildwheel --output-dir wheelhouse @@ -40,7 +40,8 @@ jobs: - name: Build on macOS env: CIBW_BUILD: cp36-macosx_x86_64 cp37-macosx_x86_64 cp38-macosx_x86_64 - CIBW_ENVIRONMENT: CC=gcc-8 FC=gfortran-8 CLIMT_ARCH=Darwin + CIBW_ENVIRONMENT: "CC=gcc-8 FC=gfortran-8 CLIMT_ARCH=Darwin" + CIBW_BEFORE_ALL_MACOS: brew remove gcc; brew install gcc@8 if: ${{ runner.os == 'macOS' }} run: python -m cibuildwheel --output-dir wheelhouse diff --git a/.github/workflows/release_climt_windows.yml b/.github/workflows/release_climt_windows.yml new file mode 100644 index 00000000..54f2293b --- /dev/null +++ b/.github/workflows/release_climt_windows.yml @@ -0,0 +1,58 @@ +# This workflow will install compilers and packges on windows platform + +name: windows package + +on: + release: + types: [published] + +jobs: + windows_package: + runs-on: windows-2019 + defaults: + run: + shell: bash -l {0} + strategy: + matrix: + python-version: ["3.6","3.7", "3.8"] + steps: + - uses: actions/checkout@v2 + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: ${{ matrix.python-version }} + - shell: bash -l {0} + run: | + export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ + export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables + conda activate test + which python + conda install -c msys2 m2w64-gcc m2w64-gcc-fortran m2w64-winpthreads-git m2w64-openblas + conda install libpython + which gcc + which gfortran + 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 + touch libmsvcr140.dll + cp /c/Miniconda/envs/test/Library/bin/vcruntime140.dll /c/Miniconda/envs/test/Library/bin/msvcr140.dll + ls -l + python setup.py develop + py.test -v + + - if: ${{ matrix.python-version == '3.6' }} + run: | + export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ + python setup.py sdist + + - if: ${{ github.event_name == 'release' }} + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + run: | + export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ + export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables + python setup.py bdist_wheel + python -m pip install twine + twine upload dist/* diff --git a/.github/workflows/windows-package.yml b/.github/workflows/windows-package.yml index 8a05b9dd..37edcb05 100644 --- a/.github/workflows/windows-package.yml +++ b/.github/workflows/windows-package.yml @@ -6,7 +6,7 @@ on: push: branches: [ master, without-dycore ] pull_request: - branches: [ master, develop ] + branches: [ develop ] jobs: windows_package: @@ -23,31 +23,33 @@ jobs: with: auto-update-conda: true python-version: ${{ matrix.python-version }} - - shell: bash -l {0} + - shell: bash -l {0} run: | - # export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ + export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ + export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables conda activate test which python # conda install -c msys2 m2w64-gcc m2w64-gcc-fortran m2w64-winpthreads-git m2w64-openblas conda install libpython - # which gcc - # which gfortran - # 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 + which gcc + which gfortran + 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 touch libmsvcr140.dll # cp /c/Miniconda/envs/test/Library/bin/vcruntime140.dll /c/Miniconda/envs/test/Library/bin/msvcr140.dll # ls -l python setup.py develop py.test -v - + - if: ${{ github.event_name == 'release' }} - env: + env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} run: | export COMPILER_PATH=/c/Miniconda/envs/test/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 diff --git a/HISTORY.rst b/HISTORY.rst index 2929117f..955f969f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,11 @@ Latest * Removed dycore to move it to independent package +v.0.16.15 +--------- + +* Move to Github Actions tentatively finished! + v.0.16.11 --------- diff --git a/climt/__init__.py b/climt/__init__.py index 5157174f..f11fda47 100644 --- a/climt/__init__.py +++ b/climt/__init__.py @@ -28,4 +28,4 @@ EmanuelConvection, SlabSurface, DcmipInitialConditions, IceSheet, Instellation, DryConvectiveAdjustment, BucketHydrology) -__version__ = '0.16.14' +__version__ = '0.16.25' diff --git a/climt/_lib/Makefile b/climt/_lib/Makefile index f980f0a4..efa0f02f 100644 --- a/climt/_lib/Makefile +++ b/climt/_lib/Makefile @@ -29,7 +29,6 @@ endif all: simple_physics_lib emanuel_lib rrtmg_lw_lib rrtmg_sw_lib libdcmip - # Simple Physics Configuration simple_physics_lib: $(CLIMT_ARCH)/libsimple_physics.a diff --git a/setup.cfg b/setup.cfg index a4d91a79..e3681116 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.16.14 +current_version = 0.16.25 commit = True tag = False diff --git a/setup.py b/setup.py index b1aba9b6..e8ffb034 100644 --- a/setup.py +++ b/setup.py @@ -236,7 +236,7 @@ def run(self): setup( name='climt', - version='0.16.14', + version='0.16.25', description='CliMT is a Toolkit for building Earth system models in Python.', long_description=readme + '\n\n' + history, author="Rodrigo Caballero",