-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (43 loc) · 1.59 KB
/
example_run_tf1_and_tf2_model.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
name: Run Tensorflow 1 and Tensorflow 2 models
on:
push:
branches:
- main
pull_request:
branches: [ main ]
paths-ignore:
- .github/workflows/bioimageio_ci.yml
- .github/workflows/test_mac_shm.yml
jobs:
build-and-run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest, macos-12]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '11'
- name: Build with Maven
run: mvn clean install
- name: Generate Classpath (Unix)
if: runner.os != 'Windows'
run: echo "CLASSPATH=$(mvn -q exec:exec -Dexec.executable=echo -Dexec.args='%classpath')" >> $GITHUB_ENV
- name: Generate Classpath (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
$classpath = mvn -q exec:exec "-Dexec.executable=echo" "-Dexec.args='%classpath'"
echo "CLASSPATH=$classpath" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Run Specific Class (Unix)
if: runner.os != 'Windows'
run: java -cp $CLASSPATH:target/classes io.bioimage.modelrunner.example.ExampleLoadTensorflow1Tensorflow2
- name: Run Specific Class (Windows)
if: runner.os == 'Windows'
shell: powershell
run: java -cp "$env:CLASSPATH;target/classes" io.bioimage.modelrunner.example.ExampleLoadTensorflow1Tensorflow2