Skip to content

Commit

Permalink
Release process (#357)
Browse files Browse the repository at this point in the history
* Remove error if mpi4py found at install time but not at run time.

* Only error on missing lapack if we are not on readthedocs.

* Fix typo in CMakeLists.txt when checking for static build.

* Fix typo

* Another small fix for the case of mpi4py found at build time but not at run time.

* Remove stale MPI files.  Remove MPI information from the Environment
class in the compiled extension so that this information is only
checked at run time.  This allows installing toast-cmb and mpi4py
in any order and things always work based on the current environment.

* Move wheel tests back to a daily job.  Update release to rc4
  • Loading branch information
tskisner authored Jun 13, 2020
1 parent 1bfdb48 commit f404a0c
Show file tree
Hide file tree
Showing 30 changed files with 186 additions and 1,123 deletions.
121 changes: 62 additions & 59 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ jobs:
name: Python source dist
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Dependencies
run: pip install twine
- name: Pull Dependency Image
run: docker pull hpc4cmb/toast-deps-py37:latest
- name: Create dist directory
run: mkdir -p dist && rm -f dist/*
- name: Build source package
run: docker run -v "$(pwd)":/home/toast hpc4cmb/toast-deps-py37:latest /home/toast/wheels/build_sdist.sh
- name: Upload to PyPI
run: |
python -m twine upload dist/toast*.tar.gz
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Dependencies
run: pip install twine
- name: Pull Dependency Image
run: docker pull hpc4cmb/toast-deps-py37:latest
- name: Create dist directory
run: mkdir -p dist && rm -f dist/*
- name: Build source package
run: docker run -v "$(pwd)":/home/toast hpc4cmb/toast-deps-py37:latest /home/toast/wheels/build_sdist.sh
- name: Upload to PyPI
run: |
python -m twine upload dist/toast*.tar.gz
wheels-36:
name: Python 3.6 wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -51,20 +51,21 @@ jobs:
CIBW_BEFORE_TEST: pip3 install numpy && pip3 install mpi4py
CIBW_TEST_COMMAND: export OMP_NUM_THREADS=2; python -c 'import toast.tests; toast.tests.run()'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install twine cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Upload to PyPI
run: |
python -m twine upload wheelhouse/toast*.whl
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install twine cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Upload to PyPI
run: |
python -m twine upload wheelhouse/toast*.whl
wheels-37:
name: Python 3.7 wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -83,20 +84,21 @@ jobs:
CIBW_BEFORE_TEST: pip3 install numpy && pip3 install mpi4py
CIBW_TEST_COMMAND: export OMP_NUM_THREADS=2; python -c 'import toast.tests; toast.tests.run()'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install twine cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Upload to PyPI
run: |
python -m twine upload wheelhouse/toast*.whl
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install twine cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Upload to PyPI
run: |
python -m twine upload wheelhouse/toast*.whl
wheels-38:
name: Python 3.8 wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -115,17 +117,18 @@ jobs:
CIBW_BEFORE_TEST: pip3 install numpy && pip3 install mpi4py
CIBW_TEST_COMMAND: export OMP_NUM_THREADS=2; python -c 'import toast.tests; toast.tests.run()'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install twine cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Upload to PyPI
run: |
python -m twine upload wheelhouse/toast*.whl
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install twine cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Upload to PyPI
run: |
python -m twine upload wheelhouse/toast*.whl
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
name: Python 3.6
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Pull Dependency Image
Expand All @@ -29,6 +33,10 @@ jobs:
name: Python 3.7
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Pull Dependency Image
Expand All @@ -45,6 +53,10 @@ jobs:
name: Python 3.8
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Pull Dependency Image
Expand Down
117 changes: 60 additions & 57 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ jobs:
name: Python source dist
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pull Dependency Image
run: docker pull hpc4cmb/toast-deps-py37:latest
- name: Create dist directory
run: mkdir -p dist && rm -f dist/*
- name: Build source package
run: docker run -v "$(pwd)":/home/toast hpc4cmb/toast-deps-py37:latest /home/toast/wheels/build_sdist.sh
- uses: actions/upload-artifact@v2
with:
name: sdist
path: ./dist/toast*.gz
- name: Checkout
uses: actions/checkout@v2
- name: Pull Dependency Image
run: docker pull hpc4cmb/toast-deps-py37:latest
- name: Create dist directory
run: mkdir -p dist && rm -f dist/*
- name: Build source package
run: docker run -v "$(pwd)":/home/toast hpc4cmb/toast-deps-py37:latest /home/toast/wheels/build_sdist.sh
- uses: actions/upload-artifact@v2
with:
name: sdist
path: ./dist/toast*.gz
wheels-py36:
name: Python 3.6 wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -48,21 +48,22 @@ jobs:
CIBW_BEFORE_TEST: pip3 install numpy && pip3 install mpi4py
CIBW_TEST_COMMAND: export OMP_NUM_THREADS=2; python -c 'import toast.tests; toast.tests.run()'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./wheelhouse/toast*.whl
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./wheelhouse/toast*.whl
wheels-py37:
name: Python 3.7 wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -81,21 +82,22 @@ jobs:
CIBW_BEFORE_TEST: pip3 install numpy && pip3 install mpi4py
CIBW_TEST_COMMAND: export OMP_NUM_THREADS=2; python -c 'import toast.tests; toast.tests.run()'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./wheelhouse/toast*.whl
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./wheelhouse/toast*.whl
wheels-py38:
name: Python 3.8 wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -114,18 +116,19 @@ jobs:
CIBW_BEFORE_TEST: pip3 install numpy && pip3 install mpi4py
CIBW_TEST_COMMAND: export OMP_NUM_THREADS=2; python -c 'import toast.tests; toast.tests.run()'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./wheelhouse/toast*.whl
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.4.2
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./wheelhouse/toast*.whl
28 changes: 15 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ foreach(policy
endif()
endforeach()

project(toast VERSION 2.3.0 LANGUAGES C CXX)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/src/toast/RELEASE REL_VERSION)
string(REGEX REPLACE "^([0-9]+\\.[0-9]+)\\..*" "\\1" MAJMIN_VERSION "${REL_VERSION}")

project(toast VERSION ${MAJMIN_VERSION} LANGUAGES C CXX)

# Force C++11
set(CMAKE_CXX_STANDARD 11)
Expand All @@ -42,7 +45,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# extensions. We check a variable here, and if set, we look for static versions of
# our dependencies.
#
if(NOT TOAST_STATIC_DEPS AND ENV{TOAST_STATIC_DEPS})
if(NOT TOAST_STATIC_DEPS AND NOT $ENV{TOAST_STATIC_DEPS} STREQUAL "")
set(TOAST_STATIC_DEPS $ENV{TOAST_STATIC_DEPS})
endif()

Expand All @@ -61,26 +64,25 @@ if(BLAS_FOUND)
find_package(LAPACK)
if(LAPACK_FOUND)
find_package(LAPACKnames)
else(LAPACK_FOUND)
message(FATAL_ERROR "Could not find a working LAPACK installation")
endif(LAPACK_FOUND)
else(BLAS_FOUND)
message(FATAL_ERROR "Could not find a working BLAS installation")
endif(BLAS_FOUND)
else()
if($ENV{READTHEDOCS} STREQUAL "")
message(FATAL_ERROR "Could not find a working LAPACK installation")
endif()
endif()
else()
if($ENV{READTHEDOCS} STREQUAL "")
message(FATAL_ERROR "Could not find a working BLAS installation")
endif()
endif()

find_package(FFTW)

find_package(AATM)

find_package(SuiteSparse)

# Re-enable if we ever add MPI compiled extensions.
# find_package(MPI)

find_package(PythonInterp REQUIRED)

find_package(MPI4PY)

# Internal products

enable_testing()
Expand Down
Loading

0 comments on commit f404a0c

Please sign in to comment.