-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
82 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: test # default testing environment name from conda-incubator | ||
dependencies: | ||
- python=3.11 | ||
- pip | ||
- setuptools_scm | ||
- gsl | ||
- fftw | ||
- cfitsio | ||
- swig | ||
- healpy | ||
- numpy | ||
- scipy | ||
- pytest | ||
- pytest-cov |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,36 +13,87 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
py: | ||
- 3.11 | ||
CC: | ||
- gcc | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout NaMaster repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.py }} | ||
uses: actions/setup-python@v2 | ||
- name: Set up conda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
channels: conda-forge, defaults | ||
channel-priority: strict | ||
show-channel-urls: true | ||
miniforge-version: latest | ||
miniforge-variant: Mambaforge | ||
|
||
#- name: Set up Python ${{ matrix.py }} | ||
# uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: ${{ matrix.py }} | ||
|
||
- name: Install GSL, FFTW, fitsio | ||
#- name: Install GSL, FFTW, fitsio | ||
# run: | | ||
# sudo -H apt-get install libgsl-dev libfftw3-dev libcfitsio-dev | ||
|
||
- name: "macOS: set env variables" | ||
if: matrix.label == 'osx-64' | ||
run: | | ||
sudo -H apt-get install libgsl-dev libfftw3-dev libcfitsio-dev | ||
#mamba install llvm-openmp | ||
echo "DYLD_FALLBACK_LIBRARY_PATH=${CONDA_PREFIX}/lib" >> $GITHUB_ENV | ||
SDKROOT=$(xcrun --sdk macosx --show-sdk-path) | ||
echo "SDKROOT: ${SDKROOT}" | ||
echo "SDKROOT=${SDKROOT}" >> $GITHUB_ENV | ||
echo "CONDA_BUILD_SYSROOT=${SDKROOT}" >> $GITHUB_ENV | ||
export CFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" | ||
export LDFLAGS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" | ||
- name: Install python dependencies | ||
- 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: | | ||
python -m pip install -U pip | ||
pip install -U numpy | ||
pip install -U scipy | ||
pip install -U healpy | ||
pip install -U ducc0 | ||
pip install -U flake8 | ||
pip install -U pytest | ||
pip install -U pytest-cov | ||
pip install -U coveralls | ||
export MAMBA_NO_BANNER=1 # hide mamba banner from output | ||
mamba env update --file ${{ env.CONDA_ENV }} --prune | ||
#- name: Install python dependencies | ||
# run: | | ||
# python -m pip install -U pip | ||
# pip install -U numpy | ||
# pip install -U scipy | ||
# pip install -U healpy | ||
# pip install -U ducc0 | ||
# pip install -U flake8 | ||
# pip install -U pytest | ||
# pip install -U pytest-cov | ||
# pip install -U coveralls | ||
|
||
- name: Flake | ||
run: | | ||
|