Skip to content

Commit

Permalink
MacOS Arm build
Browse files Browse the repository at this point in the history
  • Loading branch information
markotoplak committed Jan 30, 2024
1 parent 9a6025b commit 7cf85a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ macos_arm64_dmg_task:
REPO: https://github.com/biolab/orange3.git
BUILD_BRANCH: master
BUILD_COMMIT: 3.36.1
APP: "/Applications/Orange.app"
APP: "/Applications/Quasar-M.app"

PYTHON_VERSION: "3.10.11"
PIP_PREFER_BINARY: "1"
Expand All @@ -15,6 +15,10 @@ macos_arm64_dmg_task:
# --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,18 +32,18 @@ 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:
Expand All @@ -51,5 +55,10 @@ macos_arm64_dmg_task:
- $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/*"
3 changes: 3 additions & 0 deletions specs/macos/requirements-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ python-louvain>=0.13
pandas~=1.5.0
xgboost
catboost

h5py
opusFC>=1.3.0

0 comments on commit 7cf85a4

Please sign in to comment.