Merge pull request #2924 from btbest/fix-export-with-omezarr01-source #17
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: conda-package | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
conda-noarch-build: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
auto-activate-base: true | |
activate-environment: "" | |
channel-priority: strict | |
miniforge-version: latest | |
conda-solver: libmamba | |
- name: install xvfb/deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install -yy libgl1-mesa-dev xvfb curl | |
- name: install common conda dependencies | |
run: conda install -n base -c conda-forge boa setuptools_scm -y | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
pkgs/noarch | |
pkgs/channeldata.json | |
key: ${{ github.sha }}-packages | |
- id: version | |
shell: bash -l {0} | |
run: | | |
vers=$( python setup.py --version ) | |
echo "version=${vers}" >> $GITHUB_OUTPUT | |
- name: linux conda build test | |
shell: bash -l {0} | |
run: | | |
mkdir -p ./pkgs/noarch | |
conda mambabuild -c conda-forge conda-recipe --no-test --output-folder ./pkgs | |
test-conda-packages: | |
needs: [conda-noarch-build] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
ilastik_variant: ["ilastik-core", "ilastik", "ilastik-gpu"] | |
exclude: | |
- os: macos-latest | |
ilastik_variant: "ilastik-gpu" | |
include: | |
- ilastik_variant: "ilastik-core" | |
build_prefix: "py_" | |
runs-on: ${{ matrix.os }} | |
env: | |
ILASTIK_PACKAGE_NAME: ${{ matrix.ilastik_variant }}-${{ needs.conda-noarch-build.outputs.version }}-${{ matrix.build_prefix }}0.tar.bz2 | |
steps: | |
# necessary on windows: https://github.com/actions/cache/issues/591#issuecomment-845132253 | |
- name: "Use GNU tar instead BSD tar" | |
if: matrix.os == 'windows-latest' | |
shell: cmd | |
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%" | |
- uses: al-cheb/[email protected] | |
with: | |
minimum-size: 12GB | |
disk-root: "C:" | |
if: | | |
matrix.os == 'windows-latest' && | |
matrix.ilastik_variant == 'ilastik-gpu' | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
auto-activate-base: true | |
activate-environment: "" | |
channel-priority: strict | |
miniforge-version: latest | |
conda-solver: libmamba | |
- name: install xvfb/deps | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -yy mesa-utils libgl1-mesa-dev xvfb curl | |
- name: install common conda dependencies | |
run: conda install -n base -c conda-forge boa setuptools_scm -y | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
pkgs/noarch | |
pkgs/channeldata.json | |
key: ${{ github.sha }}-packages | |
enableCrossOsArchive: true | |
- name: linux test | |
if: matrix.os == 'ubuntu-latest' | |
shell: bash -l {0} | |
run: | | |
xvfb-run --server-args="-screen 0 1024x768x24" conda mambabuild --test --override-channels \ | |
-c ./pkgs -c pytorch -c nvidia -c ilastik-forge -c conda-forge \ | |
./pkgs/noarch/${ILASTIK_PACKAGE_NAME} | |
- name: osx test | |
if: matrix.os == 'macos-latest' | |
shell: bash -l {0} | |
run: | | |
VOLUMINA_SHOW_3D_WIDGET=0 conda mambabuild --test --override-channels \ | |
-c ./pkgs -c pytorch -c nvidia -c ilastik-forge -c conda-forge \ | |
./pkgs/noarch/${ILASTIK_PACKAGE_NAME} | |
- name: windows test | |
if: matrix.os == 'windows-latest' | |
shell: cmd /C CALL {0} | |
run: | | |
set VOLUMINA_SHOW_3D_WIDGET=0 | |
conda mambabuild --test --override-channels ^ | |
-c ./pkgs -c pytorch -c nvidia -c ilastik-forge -c conda-forge ^ | |
./pkgs/noarch/%ILASTIK_PACKAGE_NAME% | |
# HACK: due to a bug in conda-build need to point to | |
# libarchive explicitly. | |
# https://github.com/conda/conda/issues/12563#issuecomment-1494264704 | |
env: | |
LIBARCHIVE: C:\Miniconda\Library\bin\archive.dll |