Skip to content

Update numpy, scipy, scikit-learn deps #120

Update numpy, scipy, scikit-learn deps

Update numpy, scipy, scikit-learn deps #120

name : Build Windows Conda Installer
on:
pull_request:
workflow_dispatch:
push:
branches:
- 'master'
- 'releases/**'
- 'testing/**'
jobs:
build:
runs-on: windows-2019
timeout-minutes: 60
env:
REPO: https://github.com/biolab/orange3.git
BUILD_BRANCH: master
BUILD_COMMIT: "3.37.0"
BUILD_LOCAL: ""
PYTHONFAULTHANDLER: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1
PIP_CACHE_DIR: .pip-cache
PIP_PREFER_BINARY: 1
CONDA_BUILD_VERSION: "3.26.*"
# CONDA_SPEC_FILE: ..\specs\win\conda-spec.txt
strategy:
fail-fast: False
matrix:
include:
- python-version: "3.11.8"
miniforge-version: "24.7.1-0"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: mamba-org/setup-micromamba@v1
with:
condarc: >-
channels:
- conda-forge
environment-name: build
create-args: conda conda-build boa python=3.11
init-shell: bash cmd.exe
generate-run-shell: true
- name: Checkout orange3
shell: bash
run: |
set -e
git clone -q $REPO
cd orange3
git fetch origin $BUILD_BRANCH
git checkout $BUILD_COMMIT
- name: Prepare conda packages
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
if [[ $BUILD_LOCAL ]]; then
conda mambabuild --no-test --python $PYTHON_VERSION ./orange3/conda-recipe
VERSION=$(cd orange3; python setup.py --version)
EXTRA_ARGS=(-c file:///C:/users/runneradmin/micromamba/envs/build/conda-bld)
else
VERSION=$BUILD_COMMIT
EXTRA_ARGS=()
fi
if [[ ! $CONDA_SPEC_FILE ]]; then
micromamba create -p ./env --yes \
${EXTRA_ARGS[*]} \
python=$PYTHON_VERSION \
numpy=1.25.* \
scipy=1.13.* \
scikit-learn=1.5.2 \
pandas=1.5.* \
pyqtgraph=0.13.* \
bottleneck=1.3.* \
pyqt=5.15.* \
pyqtwebengine=5.15.* \
Orange3=$VERSION \
blas=*=openblas
conda list -p ./env --export --explicit --md5 > env-spec.txt
cat env-spec.txt
echo "CONDA_SPEC_FILE=env-spec.txt" >> $GITHUB_ENV
fi
- name: Build installer
env:
PLATTAG: win_amd64
MINIFORGE_VERSION: ${{ matrix.miniforge-version }}
run: |
mkdir dist
export PATH="$(cygpath -u 'C:\Program Files (x86)\NSIS'):$PATH"
echo PATH=$PATH
bash -e ./scripts/windows/build-conda-installer.sh \
--platform $PLATTAG \
--cache-dir .cache \
--dist-dir dist \
--miniforge-version "$MINIFORGE_VERSION" \
--env-spec "$CONDA_SPEC_FILE" \
--online no
INSTALLER=( dist/Orange3*.exe )
SHA256=$( sha256sum -b $INSTALLER )
echo INSTALLER = $INSTALLER
echo SHA256 = $( sha256sum -b $INSTALLER )
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: orange-win-conda-installer
path: dist/Orange3-*.exe
if-no-files-found: error
test:
name: Test
needs: build
runs-on: windows-2019
steps:
- name: Download installer
uses: actions/download-artifact@v4
with:
name: orange-win-conda-installer
- name: Install
shell: cmd
run: |
rem # Install in silent mode. Output has to be piped somewhere so the installer
rem # runs 'attached' to the console.
for %%s in ( Orange3*.exe ) do ( set "INSTALLER=%%s" )
echo INSTALLER = %INSTALLER%
%INSTALLER% /S /D=D:\test-install > nul
- name: Run tests
shell: bash
run: |
PYTHON=$(cygpath -u 'D:\test-install\python')
$PYTHON --version
$PYTHON -m pip --version
$PYTHON -m pip list --format=freeze
# Test that orange and all dependencies are installed in a
# consistent state
#$PYTHON -m pip install --no-index --no-cache-dir orange3
# Run test suite in the installed environment.
export ORANGE_DEPRECATIONS_ERROR=1
export PYTHONWARNINGS=module
$PYTHON -m unittest -v Orange.tests Orange.widgets.tests
- name: Test conda
shell: cmd
run: |
D:\test-install\Scripts\conda.bat --help
D:\test-install\Scripts\conda.bat info
D:\test-install\Scripts\activate.bat
echo %CONDA_PREFIX%