Files
OpenBB/.github/workflows/windows10_build.yml
James Maslek 22389132b1 Change installation from pip to poetry (#4731)
* Change installation from pip to poetry

* Change env name to obb

* Change shell for mac build

* Activate the env

* Shell again

* Shell from bash to bash -l {0}

* windows poetry

* fix

* provactive fix

* fix

* venv

* removing pathex

* artifact to v2.2.4

* v3

* zip and unzip test

* fuzz fix

* numpy stupid

* asdf

* cmd line

* forgot to activate

* asdf

* asdf

* i dunno anymore

* back to old faithful

* fix spec

* fixing zip maybe

* path fix

* fix path

* code cleanup

* change artifact back

* test new nsis info

* didnt like my version

* add start program to end of install

* adding launch button to installer

* testing version file

* Copy over mac os

* poetry

* reqs

---------

Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
Co-authored-by: luqazino@gmail.com <luqazino@gmail.com>
2023-04-12 14:36:25 +00:00

129 lines
4.8 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-2019
# 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@v3
- 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 setuptools==64.0.2 wheel
python -m pip install -r requirements-full.txt
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
pwd
shell: bash
- name: zip the file
run: |
Get-Location
Compress-Archive dist release.zip
shell: pwsh
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: OpenBB-Windows10-ENV
path: release.zip
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: Checkout
uses: actions/checkout@v3
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: OpenBB-Windows10-ENV
path: .
- name: unzip artifact for deployment
run: Expand-Archive release.zip -DestinationPath .
shell: pwsh
- 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
# This should autosign the installer now - We really need to only do this when needed though. ON RELEASE
- name: Sign Installer
if: startsWith(github.ref, 'refs/heads/main')
run: |
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /td sha256 /sha1 26a8e28dbe3b1db7407b92d7de97c290d4436a32 'C:\Users\Administrator\actions-runner\_work\OpenBBTerminal\OpenBBTerminal\build\nsis\OpenBB Terminal Setup.exe'
- 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 -s forecast cryptocurrency reports alternative economy futures econometrics dashboards portfolio stocks/test_stocks_options_screen.openbb stocks/test_stocks_options.openbb forex etf stocks/test_stocks_fa.openbb > result.txt
cat result.txt
Select-String "================================ integration test summary ================================" result.txt -Context 0,100 | Select-Object -Last 2000 | Out-File failed_tests.txt
- name: Upload summary to Slack
uses: adrey/slack-file-upload-action@master
with:
token: ${{ secrets.SLACK_API_TOKEN }}
initial_comment: "Windows Build Integration test summary"
title: "Windows Build Integration test summary"
path: failed_tests.txt
channel: ${{ secrets.SLACK_CHANNEL_ID }}
# 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