diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index f6de6fc0..94b5aa55 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -5,6 +5,9 @@ on: push: branches: - development + schedule: + # Every Monday at 11PM UTC + - cron: "0 11 * * 1" jobs: build-linux: @@ -19,6 +22,10 @@ jobs: - name: Checkout Repository uses: actions/checkout@v2 + - name: "Set SDK on MacOS (if needed)" + if: startsWith(matrix.os, 'macos') + run: build_tools/install_macos_sdk.sh + - name: Set up Conda uses: conda-incubator/setup-miniconda@v3 with: @@ -38,11 +45,14 @@ jobs: printenv | sort - name: Build Conda Package - shell: bash -el {0} - run: | - conda config --add channels tpeulen - mamba install conda-build boa - cd conda-recipe - curl -sLO https://raw.githubusercontent.com/conda-forge/conda-forge-pinning-feedstock/084b098a28a7a66e9a0967d156bc55b9ebfc6726/recipe/conda_build_config.yaml - # curl -sLO https://github.com/conda-forge/conda-forge-pinning-feedstock/raw/main/recipe/conda_build_config.yaml - conda mambabuild . + uses: aganders3/headless-gui@v1 + with: + shell: bash -el {0} + run: | + conda config --add channels tpeulen + mamba install conda-build boa + cd conda-recipe + # curl -sLO https://raw.githubusercontent.com/conda-forge/conda-forge-pinning-feedstock/084b098a28a7a66e9a0967d156bc55b9ebfc6726/recipe/conda_build_config.yaml + # curl -sLO https://github.com/conda-forge/conda-forge-pinning-feedstock/raw/main/recipe/conda_build_config.yaml + conda mambabuild . + diff --git a/.github/workflows/conda-release.yml b/.github/workflows/conda-release.yml index 8f979cf1..6cbcd099 100644 --- a/.github/workflows/conda-release.yml +++ b/.github/workflows/conda-release.yml @@ -22,6 +22,10 @@ jobs: - name: Checkout Repository uses: actions/checkout@v2 + - name: "Set SDK on MacOS (if needed)" + if: startsWith(matrix.os, 'macos') + run: build_tools/install_macos_sdk.sh + - name: Set up Conda uses: conda-incubator/setup-miniconda@v3 with: @@ -41,15 +45,17 @@ jobs: printenv | sort - name: Build Conda Package - shell: bash -el {0} - run: | - mamba install conda-build boa anaconda-client - conda config --add channels tpeulen - cd conda-recipe - # Use older conda_build_config -> boost-cpp 1.78 - curl -sLO https://raw.githubusercontent.com/conda-forge/conda-forge-pinning-feedstock/084b098a28a7a66e9a0967d156bc55b9ebfc6726/recipe/conda_build_config.yaml - # curl -sLO https://github.com/conda-forge/conda-forge-pinning-feedstock/raw/main/recipe/conda_build_config.yaml - conda mambabuild . --output-folder ../conda-bld + uses: aganders3/headless-gui@v1 + with: + shell: bash -el {0} + run: | + mamba install conda-build boa anaconda-client + conda config --add channels tpeulen + cd conda-recipe + # Use older conda_build_config -> boost-cpp 1.78 + # curl -sLO https://raw.githubusercontent.com/conda-forge/conda-forge-pinning-feedstock/084b098a28a7a66e9a0967d156bc55b9ebfc6726/recipe/conda_build_config.yaml + # curl -sLO https://github.com/conda-forge/conda-forge-pinning-feedstock/raw/main/recipe/conda_build_config.yaml + conda mambabuild . --output-folder ../conda-bld - name: Upload Conda Package shell: bash -el {0} diff --git a/.prospector.yml b/.prospector.yml index ededa1a1..5a1961aa 100644 --- a/.prospector.yml +++ b/.prospector.yml @@ -9,7 +9,7 @@ pep8: disable: - N803 # argument name should be lowercase - N806 # variable in function should be lowercase - - N812 # lowercase imported as non lowercase + - N812 # lowercase imported as non-lowercase pylint: run: true diff --git a/README.md b/README.md index 0e14bab6..2ca3f5c4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,4 @@ -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/814238f7b1a14f87821beadabc758408)](https://www.codacy.com/manual/tpeulen/ChiSurf?utm_source=github.com&utm_medium=referral&utm_content=Fluorescence-Tools/ChiSurf&utm_campaign=Badge_Grade) -[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/814238f7b1a14f87821beadabc758408)](https://www.codacy.com/manual/tpeulen/ChiSurf?utm_source=github.com&utm_medium=referral&utm_content=Fluorescence-Tools/ChiSurf&utm_campaign=Badge_Coverage) -[![Build Status](https://travis-ci.org/Fluorescence-Tools/ChiSurf.svg?branch=master)](https://travis-ci.org/Fluorescence-Tools/ChiSurf) -[![Build status](https://ci.appveyor.com/api/projects/status/so2ndl1otr8ishjk?svg=true)](https://ci.appveyor.com/project/tpeulen/chisurf) +![conda build](https://github.com/fluorescence-tools/chisurf/actions/workflows/conda-build.yml/badge.svg) [![Anaconda-Server Version](https://anaconda.org/tpeulen/chisurf/badges/version.svg)](https://anaconda.org/tpeulen/chisurf) [![DOI](https://zenodo.org/badge/149296509.svg)](https://zenodo.org/badge/latestdoi/149296509) diff --git a/build_tools/install_macos_sdk.sh b/build_tools/install_macos_sdk.sh new file mode 100755 index 00000000..341634ce --- /dev/null +++ b/build_tools/install_macos_sdk.sh @@ -0,0 +1,33 @@ +# See: https://github.com/openmm/openmm/blob/master/devtools/ci/gh-actions/scripts/install_macos_sdk.sh + +# Install an older MacOS SDK +# This should guarantee OpenMM builds with extended compatibility across MacOS versions +# Adapted from conda-forge-ci-setup scripts: +# * https://github.com/conda-forge/conda-forge-ci-setup-feedstock/blob/dde296e/recipe/run_conda_forge_build_setup_osx +# * https://github.com/conda-forge/conda-forge-ci-setup-feedstock/blob/dde296e/recipe/download_osx_sdk.sh +# +# Some possible updates might involve upgrading the download link to future MacOS releases (10.15 to something else), +# depending on the version provided by the CI + +OSX_SDK_DIR="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs" +export MACOSX_DEPLOYMENT_TARGET=10.9 +export MACOSX_SDK_VERSION=10.9 + +export CMAKE_OSX_SYSROOT="${OSX_SDK_DIR}/MacOSX${MACOSX_SDK_VERSION}.sdk" + +if [[ ! -d ${CMAKE_OSX_SYSROOT}} ]]; then + echo "Downloading ${MACOSX_SDK_VERSION} sdk" + curl -L -O --connect-timeout 5 --max-time 10 --retry 5 --retry-delay 0 --retry-max-time 40 --retry-connrefused --retry-all-errors \ + https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX${MACOSX_SDK_VERSION}.sdk.tar.xz + tar -xf MacOSX${MACOSX_SDK_VERSION}.sdk.tar.xz -C "$(dirname ${CMAKE_OSX_SYSROOT})" +fi + +if [[ "$MACOSX_DEPLOYMENT_TARGET" == 10.* ]]; then +# set minimum sdk version to our target +plutil -replace MinimumSDKVersion -string ${MACOSX_SDK_VERSION} $(xcode-select -p)/Platforms/MacOSX.platform/Info.plist +plutil -replace DTSDKName -string macosx${MACOSX_SDK_VERSION}internal $(xcode-select -p)/Platforms/MacOSX.platform/Info.plist +fi + +echo "MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}" >> ${GITHUB_ENV} +echo "CMAKE_OSX_SYSROOT=${MACOSX_DEPLOYMENT_TARGET}" >> ${GITHUB_ENV} +echo "CMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}" >> ${GITHUB_ENV} \ No newline at end of file diff --git a/conda-recipe/conda_build_config.yaml b/conda-recipe/conda_build_config.yaml index c87ce8d1..60acf265 100644 --- a/conda-recipe/conda_build_config.yaml +++ b/conda-recipe/conda_build_config.yaml @@ -1,5 +1,5 @@ -CONDA_BUILD_SYSROOT: - - /opt/MacOSX10.13.sdk # [osx] +#CONDA_BUILD_SYSROOT: +# - /opt/MacOSX10.9.sdk # [osx] c_compiler: - gcc # [linux] - clang # [osx] diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index a6c5a361..596222b4 100755 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -52,6 +52,7 @@ requirements: - matplotlib - deprecation - scikit-fluorescence + - imp - typing_extensions 4.5.* - typing_utils 0.1.* - scipy 1.11.* @@ -67,6 +68,8 @@ requirements: - pytools 2023.* - emcee 3.1.* - pyopengl 3.1.* + - pocl >=0.14 # [linux or osx] + - oclgrind # [win] - pymol-open-source 2.5.* - tttrconvert - qscintilla2 @@ -76,6 +79,16 @@ requirements: - ndxplorer - clsmview +app: + entry: chisurf + summary: ChiSurf analysis platform for fluorescence data + +test: + imports: + - chisurf + commands: + - chisurf & # [linux or osx] + about: home: https://github.com/Fluorescence-Tools/ChiSurf license: {{ data.get('license') }} diff --git a/tools b/tools index fc39c47c..b4b69d40 160000 --- a/tools +++ b/tools @@ -1 +1 @@ -Subproject commit fc39c47ca9d4d5f6f5b2657776774d6fb02684a8 +Subproject commit b4b69d402c6e449559cce7a7520f42e08a6452fc