Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JoyMonteiro authored Feb 1, 2023
2 parents c728480 + 834586e commit e6e257d
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release_climt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ 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


- 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

Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/release_climt_windows.yml
Original file line number Diff line number Diff line change
@@ -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/*
22 changes: 12 additions & 10 deletions .github/workflows/windows-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:
branches: [ master, without-dycore ]
pull_request:
branches: [ master, develop ]
branches: [ develop ]

jobs:
windows_package:
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------

Expand Down
2 changes: 1 addition & 1 deletion climt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
EmanuelConvection, SlabSurface, DcmipInitialConditions,
IceSheet, Instellation, DryConvectiveAdjustment, BucketHydrology)

__version__ = '0.16.14'
__version__ = '0.16.25'
1 change: 0 additions & 1 deletion climt/_lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.16.14
current_version = 0.16.25
commit = True
tag = False

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e6e257d

Please sign in to comment.