Skip to content

Commit

Permalink
Download SDK 10.9
Browse files Browse the repository at this point in the history
  • Loading branch information
omodei committed Aug 17, 2022
1 parent 4e795e6 commit 87483ee
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,19 @@ jobs:
run: |
# Build package
if [[ "${{matrix.os}}" == "ubuntu-latest" ]]; then
conda install -c conda-forge boa -n base
conda mambabuild --no-build-id --python=${{matrix.python-version}} conda_recipe/xspec-modelsonly-linux
#conda install -c conda-forge boa -n base
#conda mambabuild --no-build-id --python=${{matrix.python-version}} conda_recipe/xspec-modelsonly-linux
conda build --no-build-id --python=${{matrix.python-version}} conda_recipe/xspec-modelsonly-linux
else
conda install -c conda-forge clang_osx-64 clangxx_osx-64 gfortran_osx-64
curl -LO -z MacOSX10.9.sdk.tar.xz https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz
if [[ $? -ne 0 ]]; then
echo "macOS 10.9 SDK download failed"
fi
tar -C /opt/SDK/10.9SDK -xf MacOSX10.9.sdk.tar.xz
#conda install -c conda-forge clang_osx-64 clangxx_osx-64 gfortran_osx-64
conda build --python=${{matrix.python-version}} conda_recipe/xspec-modelsonly
fi
Expand Down
19 changes: 14 additions & 5 deletions build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then

TRAVIS_OS_NAME="linux"

#compilers="gcc_linux-64 gxx_linux-64 gfortran_linux-64"

elif [[ "$OSTYPE" == darwin* ]]; then

# Mac OSX

TRAVIS_OS_NAME="osx"


#compilers="clang_osx-64 clangxx_osx-64 gfortran_osx-64"
#Download the macOS 10.9 SDK to the CONDA_BUILD_SYSROOT location for the Conda Compilers to work
curl -LO -z MacOSX10.9.sdk.tar.xz https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz
if [[ $? -ne 0 ]]; then
echo "macOS 10.9 SDK download failed"
fi
tar -C /opt/SDK/10.9SDK -xf MacOSX10.9.sdk.tar.xz
elif [[ "$OSTYPE" == "cygwin" ]]; then

# POSIX compatibility layer and Linux environment emulation for Windows
Expand Down Expand Up @@ -86,18 +93,20 @@ if ! [ -f heasoft-6.30.1src.tar.gz ]; then
fi

# Build package
echo "Build package..."
echo "======> Build package..."

#conda install conda-verify

conda install -c conda-forge boa -n base
#conda install -c conda-forge boa -n base

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
conda mambabuild --python=$TRAVIS_PYTHON_VERSION conda_recipe/xspec-modelsonly
#conda mambabuild --python=$TRAVIS_PYTHON_VERSION conda_recipe/xspec-modelsonly
conda build --python=$TRAVIS_PYTHON_VERSION conda_recipe/xspec-modelsonly
#conda index $HOME/miniconda/conda-bld
else
# there is some strange error about the prefix length
conda mambabuild --no-build-id --python=$TRAVIS_PYTHON_VERSION conda_recipe/xspec-modelsonly
#conda mambabuild --no-build-id --python=$TRAVIS_PYTHON_VERSION conda_recipe/xspec-modelsonly
conda build --no-build-id --python=$TRAVIS_PYTHON_VERSION conda_recipe/xspec-modelsonly
#conda index $HOME/miniconda/conda-bld
fi
echo "======> installing..."
Expand Down
2 changes: 1 addition & 1 deletion conda_recipe/xspec-modelsonly/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
echo "================="
echo "================= build.sh =================="
echo $PWD
echo $RECIPE_DIR
echo $CC
Expand Down
4 changes: 3 additions & 1 deletion conda_recipe/xspec-modelsonly/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ c_compiler:
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
fortran_compiler:
- gfortran # [osx]
CONDA_BUILD_SYSROOT:
- /opt/MacOSX10.10.sdk # [osx]
- /opt/SDK/10.9SDK/MacOSX10.9.sdk # [osx]

0 comments on commit 87483ee

Please sign in to comment.