Merge pull request #21 from DavidStirling/stardist-patch #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
build: | |
name: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-13, windows-2019 ] | |
python-version: [ "3.8" ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout Repo | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
architecture: x64 | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: setup.py | |
- uses: actions/setup-java@v3 | |
name: Install Java | |
with: | |
distribution: "temurin" | |
java-version: "11.0.20+8" # The JDK version to make available on the path. | |
java-package: jdk | |
architecture: x64 | |
- name: Install build-time dependencies | |
run: | | |
pip install --upgrade wheel pip | |
pip install setuptools==49 | |
pip install numpy==1.23.1 | |
pip install pyinstaller-hooks-contrib==2024.2 | |
pip install pyinstaller==5.13.2 | |
pip install imageio==2.34.0 | |
pip install cython | |
pip install lxml | |
- env: | |
LDFLAGS: -L/usr/local/opt/openssl/lib | |
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }} | |
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | |
if: startsWith(matrix.os, 'macos') | |
name: MacOS dependency install | |
run: | | |
brew install graphicsmagick imagemagick | |
npm install --global create-dmg | |
brew install [email protected] | |
brew link [email protected] | |
pip install mysqlclient==2.0.3 | |
pip install https://github.com/glencoesoftware/core/releases/download/v4.2.80001/cellprofiler_core-4.2.8-py3-none-any.whl | |
pip install . | |
pip install https://github.com/DavidStirling/prokaryote/releases/download/v2.4.5/prokaryote-2.4.5.tar.gz --no-cache-dir --no-build-isolation | |
pip install https://github.com/DavidStirling/python-bioformats/releases/download/v4.1.10001/python_bioformats-4.1.10001-py3-none-any.whl | |
- env: | |
JDK_HOME: ${{ env.JAVA_HOME }} | |
CPPFLAGS: -I/usr/local/opt/[email protected]/include | |
LDFLAGS: "-L/usr/local/opt/[email protected]/lib -L/usr/local/opt/openssl/lib" | |
if: startsWith(matrix.os, 'windows') | |
name: Windows dependency install | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install mysqlclient==2.0.3 | |
pip install https://github.com/glencoesoftware/core/releases/download/v4.2.80001/cellprofiler_core-4.2.8-py3-none-any.whl | |
pip install . | |
pip install wxpython==4.1.1 | |
pip install https://github.com/DavidStirling/prokaryote/releases/download/v2.4.5/prokaryote-2.4.5.tar.gz --no-cache-dir --no-build-isolation | |
pip install https://github.com/DavidStirling/python-bioformats/releases/download/v4.1.10001/python_bioformats-4.1.10001-py3-none-any.whl | |
- name: Install plugins | |
run: | | |
pip install torch==2.2.1 | |
pip install cellpose==3.0.5 | |
pip install csbdeep==0.8.1 stardist==0.9.1 tensorflow==2.12.1 keras==2.12.0 | |
pip install markupsafe==2.0.1 h5py==3.6.0 | |
- name: Display installed packages | |
run: pip list | |
- if: startsWith(matrix.os, 'windows') | |
name: Windows pyinstaller build and package | |
run: | | |
pyinstaller distribution/windows/cellprofiler.spec | |
rm ./dist/CellProfiler/jvm.dll | |
iscc /dMyAppVersion="4.2.80002-ai" "distribution/windows/cellprofiler.iss" | |
- if: startsWith(matrix.os, 'macos') | |
name: MacOS pyinstaller build and package | |
run: | | |
pyinstaller -y ./distribution/macos/CellProfiler.spec | |
- if: startsWith(matrix.os, 'macos') | |
name: MacOS tar package | |
run: tar -czvf CellProfiler+AI.tar.gz CellProfiler+AI.app | |
working-directory: ./dist | |
- if: startsWith(matrix.os, 'macos') | |
uses: actions/upload-artifact@v4 | |
name: MacOS tar upload | |
with: | |
name: CellProfiler-macOS-4.2.80002-ai.tar.gz | |
path: ./dist/*.tar.gz | |
- if: startsWith(matrix.os, 'windows') | |
uses: actions/upload-artifact@v4 | |
name: Windows artifact upload | |
with: | |
name: CellProfiler-Windows-4.2.80002-ai.exe | |
path: ./distribution/windows/Output/*.exe | |
upload: | |
name: upload | |
needs: build | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: ./ | |
merge-multiple: true | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
files: | | |
./*.exe | |
./*.tar.gz | |
name: create-release | |
on: | |
push: | |
branches: | |
- compat-4-2-ai | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- compat-4-2-ai |