forked from CellProfiler/CellProfiler
-
Notifications
You must be signed in to change notification settings - Fork 2
159 lines (158 loc) · 5.59 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, windows-2019 ]
python-version: [ "3.8" ]
fail-fast: false
steps:
- uses: actions/checkout@v2
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" # 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==2023.10
pip install pyinstaller==4.10
pip install imageio==2.34.0
pip install cython
pip install mysqlclient==2.0.3
- 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 mysql
brew install create-dmg
pip install centrosome==1.2.2 --no-cache-dir --no-build-isolation
git clone https://github.com/glencoesoftware/core.git
cd core
git checkout compat-4-2
pip install --editable . --upgrade --no-use-pep517
cd ..
pip install --editable . --no-use-pep517
- env:
JDK_HOME: ${{ env.JAVA_HOME }}
if: startsWith(matrix.os, 'windows')
name: Windows dependency install
run: |
python -m pip install --upgrade pip setuptools wheel
pip install centrosome==1.2.2 --no-cache-dir --no-build-isolation
git clone https://github.com/glencoesoftware/core.git
cd core
git checkout compat-4-2
pip install --editable . --upgrade --no-use-pep517
cd ..
pip install --editable . --no-use-pep517
- name: Install plugins
run: |
pip install torch==2.2.1
pip install cellpose==3.0.5
pip install csbdeep==0.7.4
pip install stardist==0.8.1
pip install tensorflow==2.13.1
pip install markupsafe==2.0.1
pip install 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
iscc /dMyAppVersion="4.2.10006-ai" "distribution/windows/cellprofiler.iss"
- if: startsWith(matrix.os, 'macos')
name: MacOS pyinstaller build and package
run: |
pyinstaller -y ./distribution/macos/CellProfiler.spec
create-dmg \
--volname "CellProfiler" \
--window-pos 200 120 \
--window-size 800 529 \
--icon-size 130 \
--text-size 14 \
--icon "CellProfiler+AI.app" 260 250 \
--app-drop-link 540 250 \
--hdiutil-quiet \
"./dist/CellProfiler-macOS-4.2.10006-ai.dmg" \
"./dist/CellProfiler+AI.app"
- if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v1
name: MacOS artifact upload
with:
name: CellProfiler-macOS-4.2.10006-ai.dmg
path: ./dist/CellProfiler-macOS-4.2.10006-ai.dmg
- if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v2
name: Windows artifact upload
with:
name: CellProfiler-Windows-4.2.10006-ai.exe
path: ./distribution/windows/Output/CellProfiler-Windows-4.2.10006-ai.exe
upload:
name: upload
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: create_release
uses: actions/create-release@v1
with:
draft: true
prerelease: true
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
- uses: actions/download-artifact@v1
with:
name: CellProfiler-macOS-4.2.10006-ai.dmg
path: ./
- uses: actions/download-artifact@v1
with:
name: CellProfiler-Windows-4.2.10006-ai.exe
path: ./
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1
with:
asset_content_type: application/zip
asset_name: CellProfiler-macOS-4.2.10006-ai.dmg
asset_path: /home/runner/work/CellProfiler/CellProfiler/CellProfiler-macOS-4.2.10006-ai.dmg
upload_url: ${{ steps.create_release.outputs.upload_url }}
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1
with:
asset_content_type: application/exe
asset_name: CellProfiler-Windows-4.2.10006-ai.exe
asset_path: /home/runner/work/CellProfiler/CellProfiler/CellProfiler-Windows-4.2.10006-ai.exe
upload_url: ${{ steps.create_release.outputs.upload_url }}
name: create-release
on:
push:
branches:
- compat-4-2-ai
tags:
- "v*"
pull_request:
branches:
- compat-4-2-ai