mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-30 22:11:55 +00:00
* init * Update windows10_build.yml * Update windows10_build.yml * Update windows10_build.yml * Update windows10_build.yml * Update windows10_build.yml * Update windows10_build.yml * oops --------- Co-authored-by: James Maslek <jmaslek11@gmail.com>
102 lines
3.3 KiB
YAML
Vendored
102 lines
3.3 KiB
YAML
Vendored
name: Windows10 Build
|
|
|
|
env:
|
|
OPENBB_ENABLE_QUICK_EXIT: true
|
|
OPENBB_LOG_COLLECT: false
|
|
OPENBB_USE_ION: false
|
|
OPENBB_USE_PROMPT_TOOLKIT: false
|
|
PIP_DEFAULT_TIMEOUT: 100
|
|
PYTHONNOUSERSITE: 1
|
|
|
|
on: workflow_dispatch
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
Windows-Build:
|
|
name: Windows10 Build ENV
|
|
runs-on: windows-latest
|
|
# Configuring -------------
|
|
steps:
|
|
- name: Setup Windows Git Configuration # This is under the assumption that git is already installed on the system
|
|
run: |
|
|
Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1
|
|
git config --system core.longpaths true
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2.4.2
|
|
|
|
- name: Set up Python & Create OpenBB Environment
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.9'
|
|
|
|
- name: Create and start virtual environment
|
|
run: |
|
|
python -m venv venv
|
|
source venv/Scripts/activate
|
|
python -m pip install --upgrade pip
|
|
python -m pip install poetry==1.1.13
|
|
python -m pip install setuptools==64.0.2 wheel
|
|
python -m pip install charset_normalizer==2.1.1
|
|
python -m poetry install -E installer -E all
|
|
python -m pip uninstall papermill -y
|
|
python -m pip install git+https://github.com/nteract/papermill.git@main
|
|
python -m PyInstaller build/pyinstaller/terminal.spec --clean
|
|
|
|
shell: bash
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: OpenBB-Windows10-ENV
|
|
path: dist
|
|
|
|
|
|
Build-Exe:
|
|
name: Windows10 Build-Exe
|
|
runs-on: [self-hosted, Windows, x64]
|
|
needs: Windows-Build
|
|
# Configuring -------------
|
|
steps:
|
|
- name: Setup Windows Git Configuration # This is under the assumption that git is already installed on the system
|
|
run: |
|
|
Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1
|
|
git config --system core.longpaths true
|
|
|
|
- name: Download Artifact
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: OpenBB-Windows10-ENV
|
|
path: dist
|
|
|
|
- name: Move Files into App Folder
|
|
run: cp -r .\dist\OpenBBTerminal\ .\build\nsis\app\
|
|
# don't need this because log collection is turned off
|
|
# - name: Remove Log Data
|
|
# run: Remove-Item .\build\nsis\app\openbb_terminal\logs\ -Recurse
|
|
- name: Build Exe File
|
|
run: |
|
|
C:\'.\Program Files (x86)\'\nsis\makensis.exe .\build\nsis\setup.nsi
|
|
|
|
- name: Save Build Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Windows EXE Artifact
|
|
path: '.\build\nsis\OpenBB Terminal Setup.exe'
|
|
|
|
- name: Run Integration Tests
|
|
run: |
|
|
dist\OpenBBTerminal\OpenBBTerminal.exe -t
|
|
|
|
# Cleaning ------------------------
|
|
# Make sure to add Remove-Item C:\Users\Administrator\Desktop\OPENBB-exports -Recurse whenever integration tests get fixed
|
|
- name: Remove Previous Build
|
|
run: |
|
|
Remove-Item '.\build\nsis\OpenBB Terminal Setup.exe' -Recurse
|
|
Remove-Item .\build\nsis\app\ -Recurse
|
|
Remove-Item .\dist\ -Recurse
|
|
|