Skip to content

Commit

Permalink
Fix readthedocs (#912)
Browse files Browse the repository at this point in the history
* missing requirement

* fixing class on CI for mac, attempt 1

* Update ci_scripts/install_class_osx.sh

* use mamba

* Update ci.yml

* Update install_class_osx.sh

* bugggzzzzz

Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
  • Loading branch information
damonge and beckermr committed Dec 2, 2021
1 parent ed8764b commit e9317b4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os:
- macos-latest
- macos-10.15
- ubuntu-latest
py:
- 3.8
Expand All @@ -36,9 +36,11 @@ jobs:
channels: conda-forge,defaults
channel-priority: strict
show-channel-urls: true
miniforge-version: latest
miniforge-variant: Mambaforge

- name: remove homebrew
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-10.15'
run: |
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh -o uninstall_homebrew.sh
chmod u+x ./uninstall_homebrew.sh
Expand All @@ -47,7 +49,7 @@ jobs:
- name: lint
run: |
conda install flake8
mamba install flake8
flake8 pyccl
flake8 --exclude=data benchmarks
if [[ `grep "$(printf '\t')" pyccl/*.py` != "" ]]; then
Expand All @@ -56,14 +58,14 @@ jobs:
- name: install deps
run: |
conda install \
mamba install \
pip \
numpy nose coveralls pyyaml gsl fftw cmake swig scipy \
compilers pkg-config setuptools_scm pytest pandas pytest-cov \
cython "camb>=1.3" isitgr traitlets fast-pt
if [[ ${MATRIX_OS} == "macos-latest" ]]; then
conda install llvm-openmp
if [[ ${MATRIX_OS} == "macos-10.15" ]]; then
mamba install llvm-openmp
echo "DYLD_FALLBACK_LIBRARY_PATH=${CONDA_PREFIX}/lib" >> $GITHUB_ENV
SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
echo "SDKROOT: ${SDKROOT}"
Expand All @@ -75,7 +77,7 @@ jobs:

- name: install class
run: |
if [[ ${MATRIX_OS} == "macos-latest" ]]; then
if [[ ${MATRIX_OS} == "macos-10.15" ]]; then
. ci_scripts/install_class_osx.sh
else
. ci_scripts/install_class_linux.sh
Expand Down
10 changes: 8 additions & 2 deletions ci_scripts/install_class_osx.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
#!/bin/bash

export CONDA_BUILD_SYSROOT=/

rm -rf class_public
git clone --depth=1000 https://github.com/lesgourg/class_public.git
cd class_public
git checkout v2.7.2

echo "----------------------------------"
env
echo "----------------------------------"

sed -i.bak -e 's/^CC/#CC/g' Makefile
sed -i.bak -e 's/^OPTFLAG =/OPTFLAG = ${CFLAGS} ${LDFLAGS}/g' Makefile
sed -i.bak -e 's/^#CCFLAG +=/CCFLAG +=/g' Makefile
sed -i.bak -e 's/^#CCFLAG =/CCFLAG =/g' Makefile

echo "----------------------------------"
cat Makefile
echo "----------------------------------"

make -j4

# at this point the make file leaves you in the python dir
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m2r
m2r2

0 comments on commit e9317b4

Please sign in to comment.