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
|
2022-02-23 06:36:47 +00:00
|
|
|
|
|
|
|
- name: Archive TNC
|
|
|
|
uses: thedoctor0/zip-release@master
|
|
|
|
with:
|
|
|
|
type: 'zip'
|
2022-02-23 07:12:24 +00:00
|
|
|
filename: '${{ matrix.zip_name }}.zip'
|
2022-02-23 06:36:47 +00:00
|
|
|
directory: ./tnc/dist/tnc
|
2022-02-23 06:48:03 +00:00
|
|
|
path: .
|
2022-02-23 06:36:47 +00:00
|
|
|
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
|
|
|
|
|
|
|
- name: LIST ALL FILES
|
|
|
|
shell: bash
|
|
|
|
working-directory: tnc
|
|
|
|
run: |
|
|
|
|
ls -R
|
|
|
|
|
2022-02-23 07:51:06 +00:00
|
|
|
|
2022-02-23 06:36:47 +00:00
|
|
|
|
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:
|
2022-02-22 10:06:22 +00:00
|
|
|
node-version: 16
|
2022-02-16 06:34:45 +00:00
|
|
|
|
2022-02-25 12:10:54 +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 }}
|
2022-02-22 10:06:22 +00:00
|
|
|
# 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"
|
|
|
|
|
2022-02-25 12:10:54 +00:00
|
|
|
|