Run all Bioimage.io models #453
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
name: Run all Bioimage.io models | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- src/main/java/io/bioimage/modelrunner/example/ExampleLoadAndRunAllBmzModels.java | |
- .github/workflows/example_run_all_bmz_models.yml | |
schedule: | |
- cron: '30 2 * * *' | |
workflow_dispatch: | |
release: | |
types: | |
- published | |
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 ExampleLoadAndRunAllBmzModels.java (Unix) | |
if: runner.os != 'Windows' | |
run: java -cp $CLASSPATH:target/classes io.bioimage.modelrunner.example.ExampleLoadAndRunAllBmzModels | |
- name: Run ExampleLoadAndRunAllBmzModels.java (Windows) | |
if: runner.os == 'Windows' | |
shell: powershell | |
run: java -cp "$env:CLASSPATH;target/classes" io.bioimage.modelrunner.example.ExampleLoadAndRunAllBmzModels |