71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
name: PyInstaller
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python 3.7
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.7
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Test number_perser.get_number
|
|
run: |
|
|
python number_parser.py -v
|
|
|
|
# - name: Show cloudsraper package location
|
|
# run: |
|
|
# python -c 'import cloudscraper as _; print(_.__path__)'
|
|
|
|
- name: Build with pyinstaller (windows)
|
|
if: matrix.os == 'windows-latest'
|
|
run: |
|
|
pyinstaller --onefile AV_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py --add-data='C:\\hostedtoolcache\\windows\\Python\\3.7.6\\x64\\lib\\site-packages\\cloudscraper\\;cloudscraper'
|
|
|
|
- name: Build with pyinstaller (mac)
|
|
if: matrix.os == 'macos-latest'
|
|
run: |
|
|
pyinstaller \
|
|
--onefile AV_Data_Capture.py \
|
|
--hidden-import ADC_function.py \
|
|
--hidden-import core.py \
|
|
--add-data='/Users/runner/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/cloudscraper/:cloudscraper'
|
|
|
|
- name: Build with pyinstaller (ubuntu)
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
pyinstaller \
|
|
--onefile AV_Data_Capture.py \
|
|
--hidden-import ADC_function.py \
|
|
--hidden-import core.py \
|
|
--add-data='/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/cloudscraper/:cloudscraper'
|
|
|
|
- name: Copy config.ini
|
|
run: |
|
|
cp config.ini dist/
|
|
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: AV_Data_Capture-${{ matrix.os }}
|
|
path: dist
|