FreeDATA/.github/workflows/build-project-win.yml

117 lines
3.1 KiB
YAML
Raw Normal View History

2022-02-25 09:29:38 +00:00
name: Windows
2022-02-16 06:34:45 +00:00
on:
push:
2022-02-25 09:29:38 +00:00
tags:
- 'v*'
2022-02-16 06:34:45 +00:00
jobs:
build_windows_release:
name: Build Windows release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
include:
- os: windows-latest
zip_name: windows_tnc
generator: Visual Studio 16 2019
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
2022-03-14 19:35:49 +00:00
ref: main
2022-02-16 06:34:45 +00:00
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Python dependencies
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip
pip install psutil
pip install crcengine
pip install pyinstaller
pip install ujson
pip install pyserial
pip install numpy
pip install structlog
pip install colorama
2022-03-29 14:44:33 +00:00
pip install sounddevice
2022-02-16 06:34:45 +00:00
# curl.exe --output PyAudio-0.2.11-cp39-cp39-win_amd64.whl --url https://download.lfd.uci.edu/pythonlibs/y2rycu7g/PyAudio-0.2.11-cp39-cp39-win_amd64.whl
# pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
- name: Install Pyaudio
if: matrix.os == 'windows-latest'
working-directory: tnc/lib/pyaudio/windows
run: |
pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
- name: Build Windows Daemon and TNC
if: matrix.os == 'windows-latest'
working-directory: tnc
run: |
pyinstaller freedata.spec
2022-02-22 15:08:56 +00:00
- name: Copy TNC to GUI
shell: bash
run: |
cp -R ./tnc/dist/tnc ./gui/tnc
2022-02-16 06:34:45 +00:00
- name: LIST ALL FILES
shell: bash
run: |
ls -R
- name: Archive TNC
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: '${{ matrix.zip_name }}.zip'
directory: ./tnc/dist/tnc
path: .
#exclusions: '*.git* /*node_modules/* .editorconfig'
- name: LIST ALL FILES
shell: bash
working-directory: tnc
run: |
ls -R
2022-02-16 06:34:45 +00:00
#- name: Build codec2
# shell: bash
# run: |
# choco install ninja cmake
# ninja --version
# cmake --version
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
2022-02-16 06:34:45 +00:00
- name: Release TNC
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
2022-02-25 08:28:42 +00:00
2022-02-16 06:34:45 +00:00
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
package_root: "./gui/"
github_token: ${{ secrets.github_token }}
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
2022-02-25 09:29:38 +00:00
args: "-p always"