125 lines
2.8 KiB
YAML
125 lines
2.8 KiB
YAML
name: PyInstaller
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
Linux:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Python 3.8
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Set build version
|
|
run: |
|
|
version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)')
|
|
echo "::set-env name=VERSION::$version"
|
|
|
|
- name: Build with PyInstaller
|
|
run: |
|
|
pyinstaller \
|
|
--onefile AV_Data_Capture.py \
|
|
--hidden-import ADC_function.py \
|
|
--hidden-import core.py
|
|
|
|
- name: Copy config.ini
|
|
run: |
|
|
cp config.ini dist/
|
|
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: AV_Data_Capture-CLI-${{ env.VERSION }}-Linux
|
|
path: dist
|
|
|
|
Windows:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Python 3.8
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Set build version
|
|
run: |
|
|
$env:version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)')
|
|
echo "::set-env name=VERSION::$env:version"
|
|
|
|
- name: Build with PyInstaller
|
|
run: |
|
|
pyinstaller `
|
|
--onefile AV_Data_Capture.py `
|
|
--hidden-import ADC_function.py `
|
|
--hidden-import core.py
|
|
|
|
- name: Copy config.ini
|
|
run: |
|
|
cp config.ini dist/
|
|
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: AV_Data_Capture-CLI-${{ env.VERSION }}-Windows
|
|
path: dist
|
|
|
|
MacOS:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Python 3.8
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Set build version
|
|
run: |
|
|
version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)')
|
|
echo "::set-env name=VERSION::$version"
|
|
|
|
- name: Build with PyInstaller
|
|
run: |
|
|
pyinstaller \
|
|
--onefile AV_Data_Capture.py \
|
|
--hidden-import ADC_function.py \
|
|
--hidden-import core.py
|
|
|
|
- name: Copy config.ini
|
|
run: |
|
|
cp config.ini dist/
|
|
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: AV_Data_Capture-CLI-${{ env.VERSION }}-MacOS
|
|
path: dist
|