Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installers updated to current Orange (with big changes) #12

Merged
merged 33 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9445232
Revert "Still use MacOS 10.9 for installers"
markotoplak Jan 29, 2024
369f0cc
gh-actions: Build MacOS installer using GH Actions
ales-erjavec Apr 30, 2021
1237e2a
gh-actions: Build windows installer using GH Actions
ales-erjavec May 3, 2021
13c7889
gh-actions: Build Windows conda based installer on GH Actions
ales-erjavec Sep 30, 2021
b0b86cd
gh-actions: Package a portable installer on GH Actions
ales-erjavec Sep 15, 2023
a94af6c
gh-actions: Try using mamba to speedup the build
ales-erjavec Sep 22, 2023
60b4d92
gh-actions: Try using micromamba to speedup the build
ales-erjavec Sep 22, 2023
922755d
Installer using micromamba
ales-erjavec Sep 29, 2023
d248ee0
build-conda-installer: Disable local build
ales-erjavec Sep 26, 2023
c22dc8f
Remove azure, appveyor and travis config files
ales-erjavec Oct 27, 2023
7b6ad88
build-macos-installer.yml: Patch create-dmg unmount retries [skip cir…
ales-erjavec Nov 13, 2023
8ffd252
cirrus-ci: Fix macos arm64 build [skip appveyor][skip azurepipelines]
ales-erjavec Oct 4, 2023
de39555
create-dmg-installer - Replace hardcoded Orange3 app name [skip appve…
PrimozGodec Oct 4, 2023
66e6389
Test [skip appveyor][skip azurepipelines]
PrimozGodec Oct 5, 2023
2e5840f
Update included DS_Store [skip appveyor][skip azurepipelines]
ales-erjavec Oct 5, 2023
8ad602f
Revert "Installer using micromamba"
ales-erjavec Nov 23, 2023
515b3a2
requirements-arm64: Bump Qt6 to 6.6 due to QTBUG-118992
ales-erjavec Jan 8, 2024
32915f4
Downgrade Qt to 5.12 in macos arm64 build
ales-erjavec Jan 18, 2024
8ccf003
Clarify/improve message for preexisting installation
ales-erjavec Dec 22, 2023
66a6a68
Update requirements.txt
ales-erjavec Jan 5, 2024
27f5b5f
Windows installer - Ignore Miniconda Python (#45)
PrimozGodec Jan 19, 2024
9abac3f
Upgrade to Python 3.10
ales-erjavec Oct 6, 2023
d0f77e6
Update pip in requirements to 23.3.1
ales-erjavec Nov 14, 2023
79e7443
Try get (mini|ana)conda from uninstall registry
ales-erjavec Jan 19, 2024
34938b7
Move 'C:\test-install' dir to 'D:\test-install' [skip cirrus]
ales-erjavec Jan 19, 2024
f3c231c
Remove -WX switch (treat warnings as errors)
ales-erjavec Jan 19, 2024
bc74e22
Use upload-artifact@v4 and download-artifact@v4 which are significant…
PrimozGodec Jan 25, 2024
291096a
remove build-win-installer.yml
markotoplak Jan 29, 2024
9df5f4a
adapt Windows installer to Quasar
markotoplak Jan 30, 2024
7ab8d24
Remove now unused appveyor-conda-build.bat
markotoplak Jan 30, 2024
9a6025b
Adapt mac build to Quasar
markotoplak Jan 30, 2024
7cf85a4
MacOS Arm build
markotoplak Jan 30, 2024
3df6b97
use orange 3.36.2
markotoplak Jan 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ macos_arm64_dmg_task:
env:
REPO: https://github.com/biolab/orange3.git
BUILD_BRANCH: master
BUILD_COMMIT: 3.36.0
APP: "/Applications/Orange3.app"
BUILD_COMMIT: 3.36.2
APP: "/Applications/Quasar-M.app"

PYTHON_VERSION: 3.9.12
PYTHON_VERSION: "3.10.11"
PIP_PREFER_BINARY: "1"
ARCH: "arm64"
ARCHFLAGS: "-arch arm64"
PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH
# --skip-jenkins arg to create-dmg
SKIP_JENKINS: "1"

# Quasar
QUASAR_VERSION: "1.9.0"
SPECTROSCOPY_VERSION: "0.6.11"

prerequisites_script:
- brew install python@3.10
- brew install create-dmg
Expand All @@ -28,28 +32,33 @@ macos_arm64_dmg_task:

build_installer_script:
- cd orange3
- PIP_ARGS=( --pip-arg={-r,../specs/macos/requirements-arm64.txt,Orange3==$BUILD_COMMIT} );
- PIP_ARGS=( --pip-arg={-r,../specs/macos/requirements-arm64.txt,Orange3==$BUILD_COMMIT,orange-spectroscopy==$SPECTROSCOPY_VERSION,quasar==$QUASAR_VERSION} );
- ../scripts/macos/build-macos-app.sh --macos 11 "${PIP_ARGS[@]}" --python-version=${PYTHON_VERSION} "$APP"
# Apply arm64 specific patches
- patch -p1 -d "$APP" < ../scripts/macos/arm64.patch

build_dmg_installer_script:
- cd orange3
- ../scripts/macos/create-dmg-installer.sh --app "$APP" dist/Orange3.dmg
- ../scripts/macos/create-dmg-installer.sh --app "$APP" dist/Quasar.dmg
- >-
VERSION=`$APP/Contents/MacOS/pip show orange3 | grep -E '^Version: ' | cut -d ' ' -f 2`
- mv dist/Orange3.dmg dist/Orange3-$VERSION-Python${PYTHON_VERSION}-${ARCH}.dmg
- shasum -a 256 dist/Orange3-$VERSION-Python${PYTHON_VERSION}-${ARCH}.dmg
VERSION=`$APP/Contents/MacOS/pip show quasar | grep -E '^Version: ' | cut -d ' ' -f 2`
- mv dist/Quasar.dmg dist/Quasar-$VERSION-Python${PYTHON_VERSION}-${ARCH}.dmg
- shasum -a 256 dist/Quasar-$VERSION-Python${PYTHON_VERSION}-${ARCH}.dmg
- mv dist/Orange3-$VERSION-Python${PYTHON_VERSION}-${ARCH}.dmg ../dist

test_script:
- mkdir -p ~/Applications
- mv -f $APP ~/Applications/
- APP=( ~/Applications/Orange3.app )
- APP=( ~/Applications/$(basename $APP) )
- $APP/Contents/MacOS/python --version
- $APP/Contents/MacOS/pip --version
- $APP/Contents/MacOS/pip freeze
- $APP/Contents/MacOS/python -Xfaulthandler -m unittest -v Orange.tests Orange.widgets.tests || true

# Quasar specific tests
- $APP/Contents/MacOS/python -Xfaulthandler -m unittest -v orangecontrib.spectroscopy.tests
- $APP/Contents/MacOS/python -Xfaulthandler -m quasar --help
- $APP/Contents/MacOS/python -Xfaulthandler -c "import opusFC"

dmg_artifacts:
path: "dist/*"
221 changes: 221 additions & 0 deletions .github/workflows/build-conda-installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
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.36.2"
BUILD_LOCAL: ""

PYTHONFAULTHANDLER: 1
PIP_NO_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

# Quasar
QUASAR_VERSION: "1.9.0"
SPECTROSCOPY_VERSION: "0.6.11"

strategy:
fail-fast: False
matrix:
include:
- python-version: "3.10.11"
miniconda-version: "py310_23.11.0-1"

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- uses: mamba-org/setup-micromamba@v1
with:
condarc: >-
channels:
- https://quasar.codes/conda/
- conda-forge
- defaults
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.24.* \
scipy=1.10.* \
scikit-learn=1.3.* \
pandas=1.5.* \
pyqtgraph=0.13.* \
bottleneck=1.3.* \
pyqt=5.15.* \
pyqtwebengine=5.15.* \
Orange3=$VERSION \
blas=*=openblas \
quasar=$QUASAR_VERSION \
orange-spectroscopy=$SPECTROSCOPY_VERSION \
opusFC=1.3.0 \
h5py
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
MINICONDA_VERSION: ${{ matrix.miniconda-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 \
--miniconda-version "$MINICONDA_VERSION" \
--env-spec "$CONDA_SPEC_FILE" \
--online no

INSTALLER=( dist/Quasar-*.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/Quasar-*.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 ( Quasar-*.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

# Quasar specific tests
$PYTHON -m unittest -v orangecontrib.spectroscopy.tests
$PYTHON -m quasar --help
$PYTHON -c "import opusFC"

- 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%

package_portable:
name: Package a portable install
needs: [build, test]
runs-on: windows-2019
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Download installer
uses: actions/download-artifact@v3
with:
name: orange-win-conda-installer

- name: Extract installer contents
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: Package portable installer
shell: cmd
run: |
mkdir dist
ci\appveyor-make-portable.bat D:\test-install %CD%\dist\Orange.zip

- name: Upload portable installer
uses: actions/upload-artifact@v4
with:
name: orange-win-portable-installer
path: dist/Orange*.zip
if-no-files-found: error
Loading
Loading