Skip to content

Fix threading issues in auto-threshold code #120

Fix threading issues in auto-threshold code

Fix threading issues in auto-threshold code #120

Workflow file for this run

name: PyInstaller
on:
push:
tags:
- 'v*'
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [macos-12, windows-2022]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
name: Pyinstaller for ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
environment-file: requirements.yml
activate-environment: minerva-author
python-version: ${{ matrix.python-version }}
- name: OpenSlide Windows
if: startsWith(matrix.os,'windows')
shell: cmd /C CALL {0}
run: |
curl https://github.com/openslide/openslide-winbuild/releases/download/v20171122/openslide-win64-20171122.zip -L -o openslide.zip
unzip openslide.zip
dir
move openslide-win64-20171122\bin\* src\
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: OpenSlide MacOS
if: startsWith(matrix.os,'mac')
shell: bash -l {0}
run: |
brew install openslide
conda install openslide
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy dlls on Windows
if: startsWith(matrix.os,'windows')
shell: cmd /C CALL {0}
run: |
copy "%CONDA_PREFIX%\Library\bin\libcrypto-3-x64.dll" "%CONDA_PREFIX%\DLLs\libcrypto-3-x64.dll"
copy "%CONDA_PREFIX%\Library\bin\libssl-3-x64.dll" "%CONDA_PREFIX%\DLLs\libssl-3-x64.dll"
- name: Package Windows
if: startsWith(matrix.os,'windows')
shell: cmd /C CALL {0}
run: |
package_win.bat
- name: Zip Windows
if: startsWith(matrix.os,'windows')
shell: cmd /C CALL {0}
run: |
move "dist" "minerva_author_windows"
7z a minerva_author_windows.zip minerva_author_windows
- name: Package Mac
if: startsWith(matrix.os,'mac')
shell: bash -l {0}
run: |
bash package_mac.sh
- name: Zip Mac
if: startsWith(matrix.os,'mac')
shell: bash -l {0}
run: |
mv dist minerva_author_macos
mv minerva_author_macos/app minerva_author_macos/minerva_author
zip -vr minerva_author_macos.zip minerva_author_macos/ -x "*.DS_Store"
- name: Create Release
if: ${{ github.event_name == 'push' }}
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.tag }}
name: ${{ env.tag }}
draft: false
prerelease: ${{ contains(github.ref, 'rc') }}
fail_on_unmatched_files: false
files: |
minerva_author_windows.zip
minerva_author_macos.zip
- name: Upload artifacts for pull requests
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: minerva-author-pr${{ github.event.pull_request.number }}-${{ matrix.os }}
path: minerva_author_*.zip
compression-level: 0
if-no-files-found: error