Matlab Examples #279
Workflow file for this run
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
# Builds using maven | |
# Pass the arguments you wish to run to maven_commands variable, default command will be mvn install | |
--- | |
name: Maven | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [8, 11, 17, 21] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
maven_commands: install # default is install | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Build | |
run: mvn ${{ env.maven_commands }} | |
- name: Setup docker | |
if: runner.os == 'macos' | |
run: | | |
brew install docker | |
brew install docker-compose | |
- name: Symlink (compose is now a cli-plugins) | |
if: runner.os == 'macos' | |
run: | | |
mkdir -p ~/.docker/cli-plugins | |
ln -sfn /usr/local/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose | |
- name: Start docker | |
if: runner.os == 'macos' | |
run: colima start | |
- name: Run matlab tests | |
if: runner.os != 'windows' | |
run: | | |
docker run -t openmicroscopy/bio-formats-octave src/main/matlab/bftest.m | |
deploy: | |
if: startsWith(github.ref, 'refs/tags') | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
server: ome.releases | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Repository | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: 'zulu' | |
server-id: ${{ env.server }} | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Deploy | |
run: mvn deploy | |
env: | |
MAVEN_USERNAME: ${{ secrets.CI_DEPLOY_USER }} | |
MAVEN_PASSWORD: ${{ secrets.CI_DEPLOY_PASS }} |