Skip to content

Add version.properties to etc/omero.properties #2515

Add version.properties to etc/omero.properties

Add version.properties to etc/omero.properties #2515

Workflow file for this run

name: "Build"
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
build:
strategy:
matrix:
build_bf: [false]
build_zarr: [false]
build_snapshot: [false]
python-version:
- '3.10'
- '3.11'
- '3.12'
name: Build OMERO from source
runs-on: ubuntu-22.04
env:
ICE_HOME: /opt/ice-3.6.5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Ice and Ice python binding
if: matrix.build_snapshot
uses: jburel/action-ice@v3
- name: Set up Gradle 6.8.3
if: matrix.build_snapshot
uses: gradle/gradle-build-action@v2
with:
gradle-version: 6.8.3
arguments: build -x test
build-root-directory: components/tools/OmeroJava # required by the action to have a *.gradle file"
- name: Install and run flake8
run: |
pip install flake8 'setuptools<69'
flake8 .
- name: install dependencies
run: |
sudo apt-get install -y git
- name: Build Bio-Formats
id: bf
if: matrix.build_bf
run: |
git clone https://github.com/ome/bioformats /tmp/bioformats --depth 1
cd /tmp/bioformats
mvn install -DskipTests -q
echo "bf_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
echo "ome_common_version=$(mvn help:evaluate -Dexpression=ome-common.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Build ZarrReader
id: zarr_reader
if: matrix.build_zarr
run: |
git clone https://github.com/ome/ZarrReader /tmp/ZarrReader --depth 1
cd /tmp/ZarrReader
mvn install -DskipTests -q
echo "zarr_reader_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Set ZarrReader version
if: matrix.build_zarr
run: |
sed -i 's/versions.OMEZarrReader=.*/versions.OMEZarrReader=${{ steps.zarr_reader.outputs.zarr_reader_version }}/' etc/omero.properties
- name: Set Bio-Formats version
if: matrix.build_bf
run: |
DEPENDENCY="<dependency org=\"org.openmicroscopy\" name=\"ome-common\" rev=\"${{ steps.bf.outputs.ome_common_version }}\">\n<artifact name=\"ome-common\" type=\"jar\" ext=\"jar\"\/>\n<\/dependency>"
sed -i 's/versions.bioformats=.*/versions.bioformats=${{ steps.bf.outputs.bf_version }}/' etc/omero.properties
sed -i "s/<dependencies>/<dependencies>\n $DEPENDENCY/" components/tools/OmeroJava/ivy.xml
- name: Build snapshot
if: matrix.build_snapshot
id: snapshot
run: |
# to use own repo
# git clone -b your_branch https://github.com/your_repo/omero-gateway-java /tmp/omero-gateway-java
git clone https://github.com/ome/omero-gateway-java /tmp/omero-gateway-java --depth 1
cd /tmp/omero-gateway-java
gradle publishToMavenLocal -x test
echo "gateway_version=$(gradle properties -q | grep "version:" | awk '{print $2}')" >> $GITHUB_OUTPUT
- name: Set snapshot version
if: matrix.build_snapshot
run: |
sed -i 's/versions.omero-gateway=.*/versions.omero-gateway=${{ steps.snapshot.outputs.gateway_version }}/' etc/omero.properties
- name: Build
run: ./build.py
- name: Rebuild
run: ./build.py clean && ./build.py