diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 8d575a1..de80c69 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -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 diff --git a/build_local.sh b/build_local.sh index 1ee63dc..4be50a0 100755 --- a/build_local.sh +++ b/build_local.sh @@ -13,6 +13,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then TRAVIS_OS_NAME="linux" + #compilers="gcc_linux-64 gxx_linux-64 gfortran_linux-64" elif [[ "$OSTYPE" == darwin* ]]; then @@ -20,7 +21,13 @@ elif [[ "$OSTYPE" == darwin* ]]; then 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 @@ -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..." diff --git a/conda_recipe/xspec-modelsonly/build.sh b/conda_recipe/xspec-modelsonly/build.sh index e2f6949..221da5f 100644 --- a/conda_recipe/xspec-modelsonly/build.sh +++ b/conda_recipe/xspec-modelsonly/build.sh @@ -1,4 +1,4 @@ -echo "=================" +echo "================= build.sh ==================" echo $PWD echo $RECIPE_DIR echo $CC diff --git a/conda_recipe/xspec-modelsonly/conda_build_config.yaml b/conda_recipe/xspec-modelsonly/conda_build_config.yaml index 341b44b..ecd8cce 100644 --- a/conda_recipe/xspec-modelsonly/conda_build_config.yaml +++ b/conda_recipe/xspec-modelsonly/conda_build_config.yaml @@ -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]