-
Notifications
You must be signed in to change notification settings - Fork 9
103 lines (90 loc) · 3.14 KB
/
Copy pathmodel_installation_test.yaml
File metadata and controls
103 lines (90 loc) · 3.14 KB
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
name: Model installation test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
integration-tests:
strategy:
fail-fast: false
matrix:
include:
- name: ubuntu
os: ubuntu-latest
url_file_name: fiji-stable-linux64-jdk.zip
fiji_executable: ImageJ-linux64
- name: windows
os: windows-latest
url_file_name: fiji-stable-win64-jdk.zip
fiji_executable: Im ageJ-win64.exe
- name: macos-arm64
os: macos-14
url_file_name: fiji-stable-macosx-jdk.zip
fiji_executable: Contents/MacOS/ImageJ-macosx
- name: macos-latest
os: macos-latest
url_file_name: fiji-stable-macosx-jdk.zip
fiji_executable: Contents/MacOS/ImageJ-macosx
- name: macos-x86_64
os: macos-13
url_file_name: fiji-stable-macosx-jdk.zip
fiji_executable: Contents/MacOS/ImageJ-macosx
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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/stable/${{ matrix.url_file_name }}
unzip fiji.zip -d fiji
- name: Install SAMJ
shell: bash
run: |
fiji/Fiji.app/${{ matrix.fiji_executable }} --headless --update add-update-site "SAMJ" "https://sites.imagej.net/SAMJ/"
fiji/Fiji.app/${{ matrix.fiji_executable }} --headless --update update
- name: rm SAMJ-IJ file
shell: bash
run: |
rm -f /fiji/Fiji.app/plugins/SAMJ-IJ-*.jar
- name: Build Plugin
shell: bash
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.artifactId}' \
--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: Print information about the OS
shell: bash
run: |
fiji/Fiji.app/${{ matrix.fiji_executable }} --headless --console .github/scripts/print_os_specs.py
- name: Print Fiji folder
shell: bash
run: |
fiji/Fiji.app/${{ matrix.fiji_executable }} --headless --console .github/scripts/help_script.py
- name: Install SAM model
shell: bash
run: |
fiji/Fiji.app/${{ matrix.fiji_executable }} --headless --console .github/scripts/install_model.py