-
Notifications
You must be signed in to change notification settings - Fork 12
138 lines (117 loc) · 4.36 KB
/
macos_test.yaml
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
name: Macos Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
JSON_FPATH: outputs.json
MACRO_FPATH: macro.ijm
jobs:
integration-tests:
strategy:
fail-fast: false
matrix:
include:
- name: ubuntu
os: ubuntu-latest
url_file_name: fiji-linux64.zip
fiji_executable: ImageJ-linux64
- name: macos-arm64
os: macos-14
url_file_name: fiji-macosx.zip
fiji_executable: Contents/MacOS/ImageJ-macosx
- name: macos-x86_64
os: macos-13
url_file_name: fiji-macosx.zip
fiji_executable: Contents/MacOS/ImageJ-macosx
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
- name: Set up Fiji
shell: bash
run: |
mkdir -p fiji
curl -L -o fiji.zip https://downloads.imagej.net/fiji/latest/${{ matrix.url_file_name }}
unzip fiji.zip -d fiji
- name: Build Plugin
run: mvn clean package
- name: Get plugin name and version
shell: bash
run: |
MVN_VERSION=$(mvn -q \
-Dexec.executable=echo \
-Dexec.args='${project.version}' \
--non-recursive \
exec:exec)
MVN_NAME=$(mvn -q \
-Dexec.executable=echo \
-Dexec.args='${project.name}' \
--non-recursive \
exec:exec)
echo "version=${MVN_VERSION}" >> $GITHUB_OUTPUT
echo "name=${MVN_NAME}" >> $GITHUB_OUTPUT
id: mvn_info
- name: Copy Plugin to Fiji
shell: bash
run: cp target/${{steps.mvn_info.outputs.name}}-${{steps.mvn_info.outputs.version}}.jar fiji/Fiji.app/plugins/
- name: Copy Plugin to Fiji
shell: bash
run: cp dl-modelrunner-0.5.11-SNAPSHOT.jar fiji/Fiji.app/plugins/
- name: Download dependencies
shell: bash
run: |
#curl -L --output-dir fiji/Fiji.app/jars/ -O "https://maven.scijava.org/content/groups/public/io/bioimage/dl-modelrunner/0.5.11-SNAPSHOT/dl-modelrunner-0.5.11-20241123.134210-7.jar"
curl -L --output-dir fiji/Fiji.app/jars/ -O "https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.13.0/jna-platform-5.13.0.jar"
curl -L --output-dir fiji/Fiji.app/jars/ -O "https://maven.scijava.org/content/groups/public/net/imglib2/imglib2/7.1.4/imglib2-7.1.4.jar"
- name: Set up engine using Jython script and Fiji headless
shell: bash
run: |
fiji/Fiji.app/${{ matrix.fiji_executable }} --headless --console scripts/download_engines.py -engines_path fiji/Fiji.app/engines
- name: Unzip model to models folder
shell: bash
run: |
unzip test_samples/brightfield_nuclei_.zip -d fiji/Fiji.app/models
- name: check model is there
shell: bash
run: |
ls fiji/Fiji.app/models/brightfield_nuclei
- name: rm file
shell: bash
run: |
rm fiji/Fiji.app/jars/imglib2-6.1.0.jar
#rm /Users/runner/work/deepimagej-plugin/deepimagej-plugin/fiji/Fiji.app/jars/imglib2-6.1.0.jar
#rm /home/runner/work/deepimagej-plugin/deepimagej-plugin/fiji/Fiji.app/jars/imglib2-6.1.0.jar
- name: Create a New Directory
run: mkdir -p outputs
- name: Create a New Directory 2
run: mkdir -p outputs_npy
- name: CHEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEECK
shell: bash
run: |
#ls fiji/Fiji.app/engines/pytorch-2.0.0-2.0.0-macosx-x86_64-cpu
#ls fiji/Fiji.app/engines/pytorch-1.13.1-1.13.1-macosx-x86_64-cpu
- name: Run macros
shell: bash
run: |
fiji/Fiji.app/${{ matrix.fiji_executable }} --headless --console -macro test_samples/test.ijm
- name: Convert to npy
shell: bash
run: |
ls .github
fiji/Fiji.app/${{ matrix.fiji_executable }} --headless --console .github/to_numpy.py
- name: Run final python
shell: bash
run: |
python -m pip install numpy
python .github/check_numpy_vals.py