Lmax docstring fix #335
Workflow file for this run
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: continuous-integration | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- releases/* | |
pull_request: null | |
env: | |
CACHE_NUMBER: 0 # increase to reset cache manually | |
CONDA_ENV: .github/environment.yml | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
include: | |
- os: macos-latest | |
label: osx-64 | |
prefix: /Users/runner/miniconda3 | |
- os: ubuntu-latest | |
label: linux-64 | |
prefix: /usr/share/miniconda3 | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout NaMaster repository | |
uses: actions/checkout@v4 | |
- name: Set up conda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
channels: conda-forge, defaults | |
channel-priority: strict | |
show-channel-urls: true | |
miniforge-version: latest | |
miniforge-variant: Miniforge3 | |
- name: Set current date as environment variable | |
run: echo "TODAY=$(date +'%Y.%m.%d')" >> $GITHUB_ENV | |
- name: Get cached environment | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
path: ${{ matrix.prefix }} | |
key: | |
conda-py${{ matrix.py }}--${{ | |
matrix.os }}--${{ | |
hashFiles(env.CONDA_ENV) }}-${{ | |
hashFiles('setup.py') }}--${{ | |
env.TODAY }}-${{ | |
env.CACHE_NUMBER }} | |
- name: Install environment packages | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
export MAMBA_NO_BANNER=1 # hide mamba banner from output | |
mamba env update --file ${{ env.CONDA_ENV }} --prune | |
- name: Show installed | |
run: conda list | |
- name: conda libraries in path | |
run: | | |
ls ${CONDA_PREFIX}/lib | |
ls ${CONDA_PREFIX}/include | |
- name: Install fitsio, fftw (ubuntu) | |
if: matrix.label == 'linux-64' | |
run: | | |
sudo -H apt-get install libcfitsio-dev libfftw3-dev | |
- name: Install other dependencies (mac) | |
if: matrix.label == 'osx-64' | |
run: | | |
brew install fftw | |
# Unclear why, but we don't seem to have to install gsl | |
# for linux, only mac... | |
brew install gsl | |
brew install openblas | |
brew install libomp | |
brew install cfitsio | |
brew install autoconf | |
brew install automake | |
brew install libtool | |
# Annoyingly, the version of healpy that gets | |
# installed by pip when installing namaster seems | |
# to crash on mac, so we install it here instead | |
conda install healpy | |
- name: Build NaMaster (ubuntu) | |
if: matrix.label == 'linux-64' | |
run: | | |
python setup.py install | |
- name: Build NaMaster (mac) | |
if: matrix.label == 'osx-64' | |
run: | | |
# After migrating to Xcode 15.4, a bunch of things broke, for whatever reason... | |
sudo xcode-select -s "/Applications/Xcode_15.0.1.app" | |
# Without the prefixes, it won't compile on mac | |
CC=gcc-14 LDFLAGS=-L/opt/homebrew/lib CPPFLAGS=-I/opt/homebrew/include python -m pip install . | |
- name: C tests | |
run: | | |
make check | |
- name: Python tests | |
run: | | |
pytest -vv pymaster --cov=pymaster | |
- name: coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
coveralls --service=github | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout CCL repository | |
uses: actions/checkout@v3 | |
- name: Lint | |
uses: py-actions/flake8@v2 | |
with: | |
args: "--config .flake8" |