mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-12 04:13:06 +00:00
* Create m1_macos_build.yml * Update m1_macos_build.yml * Update m1_macos_build.yml * Update m1_macos_build.yml * Update m1_macos_build.yml * Update m1_macos_build.yml * Update m1_macos_build.yml * taking out notarize and staple includes codesigning tho * changing prediction install I am expecting a code sign error instead of a running the actual executable error. trying with -e prediction instead of -e prediction-m1-mac * Changing prediction, keeping code signing * Update m1_macos_build.yml * Update m1_macos_build.yml * taking out integration tests * rerun * Update m1_macos_build.yml * adding pred back to turn to false * making same as upstream release * Update m1_macos_build.yml * Update m1_macos_build.yml * Update m1_macos_build.yml Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
106 lines
4.1 KiB
YAML
Vendored
106 lines
4.1 KiB
YAML
Vendored
name: M1 MacOS Build
|
|
env:
|
|
OPENBB_ENABLE_QUICK_EXIT: true
|
|
OPENBB_LOG_COLLECTION: false
|
|
OPENBB_USE_ION: false
|
|
OPENBB_USE_PROMPT_TOOLKIT: false
|
|
PIP_DEFAULT_TIMEOUT: 100
|
|
PYTHONNOUSERSITE: 1
|
|
on: workflow_dispatch
|
|
jobs:
|
|
Build:
|
|
name: M1 MacOS Build
|
|
runs-on: [self-hosted, macos, ARM64]
|
|
steps:
|
|
# Checkout repository main branch. this allows for the commit hashes to line up
|
|
- name: Checkout
|
|
uses: actions/checkout@v2.4.2
|
|
- name: Git Log
|
|
run: git log
|
|
# Install create-dmg
|
|
- name: Install create-dmg
|
|
run: brew install create-dmg
|
|
# The following commands to clear previous PATHS and restore to defaults since we have to maintain the instance ourselves
|
|
- name: Clean Previous Path
|
|
run: |
|
|
export PATH=""
|
|
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
|
echo $PATH
|
|
# Set up caching for conda env so that the workflow runs quickly after the first time
|
|
- name: Setup Conda Caching
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/conda_pkgs_dir
|
|
key: conda-macos-3-9-${{ hashFiles('build/conda/conda-3-9-env.yaml') }}
|
|
# Set up miniconda using the environment yaml file within the repo
|
|
- name: Setup Miniconda
|
|
uses: conda-incubator/setup-miniconda@v2
|
|
with:
|
|
miniconda-version: "latest"
|
|
auto-update-conda: true
|
|
channels: conda-forge,defaults
|
|
show-channel-urls: true
|
|
channel-priority: flexible
|
|
environment-file: build/conda/conda-3-9-env.yaml
|
|
activate-environment: build_env
|
|
use-only-tar-bz2: true # Needed for caching some reason
|
|
- name: Initialize Conda and Reset Terminal
|
|
run: |
|
|
conda init
|
|
exec zsh -l
|
|
- name: Run Poetry
|
|
shell: bash -l {0}
|
|
run: poetry install
|
|
- name: Install Pyinstaller
|
|
shell: bash -l {0}
|
|
run: poetry install -E installer
|
|
- name: Install Prediction Modules
|
|
shell: bash -l {0}
|
|
run: |
|
|
conda install -c apple tensorflow-deps
|
|
pip install tensorflow-macos
|
|
# Double Checking Version Number
|
|
- name: Check OpenBB Version
|
|
shell: bash -l {0}
|
|
run: pip list | grep openbb
|
|
# This is basically the same as build4mac.sh
|
|
- name: Build Bundle
|
|
shell: bash -l {0}
|
|
run: |
|
|
pyinstaller build/pyinstaller/terminal.spec
|
|
osascript build/pyinstaller/setup_icons.applescript
|
|
mkdir DMG
|
|
cp -r build/pyinstaller/macOS_package_assets/* DMG/
|
|
mv dist/OpenBBTerminal DMG/OpenBB\ Terminal/.OpenBB
|
|
- name: Create DMG
|
|
run: create-dmg --volname "OpenBB Terminal" --volicon "images/dmg_volume.icns" --background "images/openbb_dmg_background.png" --icon "OpenBB Terminal" 190 250 --window-pos 190 120 --window-size 800 400 --icon-size 100 --text-size 14 --app-drop-link 600 250 --eula LICENSE --format UDZO --no-internet-enable "OpenBB Terminal".dmg DMG
|
|
- name: Clean up Build Artifacts
|
|
run: |
|
|
rm -rf build/terminal
|
|
rm -rf dist
|
|
rm -rf DMG
|
|
- name: Save Build Artifact DMG
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: M1 MacOS DMG Artifact
|
|
path: OpenBB\ Terminal.dmg
|
|
- name: Convert & Mount DMG
|
|
run: |
|
|
hdiutil convert OpenBB\ Terminal.dmg -format UDTO -o openbbterminal.cdr
|
|
hdiutil attach openbbterminal.cdr
|
|
rm -rf openbbterminal.cdr
|
|
- name: Directory Change
|
|
run: |
|
|
cd
|
|
cd /Volumes/OpenBB\ Terminal
|
|
ls
|
|
cp -R OpenBB\ Terminal ~/Desktop
|
|
- name: Unmount DMG
|
|
run: hdiutil detach /dev/disk6
|
|
- name: Run Integration Tests
|
|
run: /Users/ec2-user/Desktop/OpenBB\ Terminal/.OpenBB/OpenBBTerminal /Users/ec2-user/actions-runner/_work/OpenBBTerminal/OpenBBTerminal/scripts/*.openbb -t
|
|
- name: Remove OpenBB Folder
|
|
run: rm -rf /Users/ec2-user/Desktop/OpenBB\ Terminal
|
|
- name: Remove OpenBB Exports Folder
|
|
run: rm -rf ~/Desktop/OPENBB-exports
|