Skip to content

Commit

Permalink
Merge pull request #47 from Fluorescence-Tools/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
tpeulen authored Feb 13, 2024
2 parents 6f4b1c7 + 02e2bbc commit 9bc1236
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 25 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
push:
branches:
- development
schedule:
# Every Monday at 11PM UTC
- cron: "0 11 * * 1"

jobs:
build-linux:
Expand All @@ -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:
Expand All @@ -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 .
24 changes: 15 additions & 9 deletions .github/workflows/conda-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion .prospector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
33 changes: 33 additions & 0 deletions build_tools/install_macos_sdk.sh
Original file line number Diff line number Diff line change
@@ -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}
4 changes: 2 additions & 2 deletions conda-recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
13 changes: 13 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ requirements:
- matplotlib
- deprecation
- scikit-fluorescence
- imp
- typing_extensions 4.5.*
- typing_utils 0.1.*
- scipy 1.11.*
Expand All @@ -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
Expand All @@ -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') }}
Expand Down
2 changes: 1 addition & 1 deletion tools
Submodule tools updated from fc39c4 to b4b69d

0 comments on commit 9bc1236

Please sign in to comment.