🔀 Merge develop
into dev-define-engine-abc
#928
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
# This workflow will install the package as is on the github default branch using pip | |
name: pip Install | |
on: | |
push: | |
paths: [ "requirements*.yml", "conda-env-create.yml", "requirements/requirement*.txt", "setup*py", "setup*cfg", "pytproject*toml", "MANIFEST*in"] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-24.04, windows-latest, macos-latest] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: 🐧 Install OpenSlide & OpenJPEG | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update | |
sudo apt-get install -y libopenslide-dev openslide-tools libopenjp2-7 libopenjp2-tools | |
python -m pip install --upgrade pip | |
- name: 🍎 Install OpenSlide & OpenJPEG | |
if: runner.os == 'macOS' | |
run: | | |
brew install openslide openjpeg | |
python -m pip install --upgrade pip | |
- name: 🪟 Install OpenJPEG | |
if: runner.os == 'Windows' | |
run: | | |
# Install OpenJPEG | |
git clone https://github.com/uclouvain/openjpeg.git | |
cd openjpeg | |
mkdir build | |
cd build | |
cmake -G "MinGW Makefiles" .. -DCMAKE_BUILD_TYPE=Release | |
ls | |
make -j4 | |
make install | |
make clean | |
- name: 🪟 Install OpenSlide | |
if: runner.os == 'Windows' | |
run: | | |
choco install wget --no-progress | |
wget https://github.com/openslide/openslide-winbuild/releases/download/v20220811/openslide-win64-20220811.zip | |
7z x openslide-win64-20220811.zip | |
ls openslide-win64-20220811 | |
# Add to PATH | |
echo "$(realpath ./openslide-win64-20220811/bin)" >> $GITHUB_PATH | |
echo "$(realpath ./openslide-win64-20220811/lib)" >> $GITHUB_PATH | |
# Install | |
mkdir "C:\Program Files\openslide" | |
Copy-Item -Path ".\openslide-win64-20220811\*" -Destination "C:\Program Files\openslide" -Recurse | |
ls "C:/Program Files/openslide" | |
- name: 🪟 Install SQLite Shell | |
if: runner.os == 'Windows' | |
run: choco install sqlite.shell --no-progress | |
- name: SQLite Version Information | |
run: | | |
sqlite3 --version | |
sqlite3 ":memory:" -list ".output stdout" "pragma compile_options" ".exit" | |
- name: OpenSlide Version Information | |
if: runner.os == 'Linux' | |
run: openslide-quickhash1sum --version | |
- name: OpenJPEG Version Information | |
continue-on-error: true # This -h option has exit code 1 for some reason | |
run: opj_dump -h | |
- name: pip Install From GitHub Repo on Linux and macOS | |
if: runner.os != 'Windows' | |
run: python -m pip install git+https://github.com/TissueImageAnalytics/tiatoolbox@${GITHUB_REF_NAME} | |
- name: pip Install From GitHub on Windows | |
if: runner.os == 'Windows' | |
run: python -m pip install git+https://github.com/TissueImageAnalytics/tiatoolbox@$env:GITHUB_REF_NAME | |
- name: Test TIAToolbox Import | |
shell: python | |
run: | | |
import os | |
if hasattr(os, "add_dll_directory"): | |
# Required for Python>=3.8 on Windows | |
with os.add_dll_directory(r"D:\a\tiatoolbox\tiatoolbox\openslide-win64-20220811\bin"): | |
import tiatoolbox | |
else: | |
os.environ["PATH"] = r"D:\a\tiatoolbox\tiatoolbox\openslide-win64-20220811\bin;" | |
import tiatoolbox |