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

118 lines
3 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-05-18 22:33:54 +00:00
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-05-18 22:33:54 +00:00
2022-02-16 06:34:45 +00:00
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
2022-05-18 22:33:54 +00:00
python-version: 3.9
2022-02-16 06:34:45 +00:00
- name: Install Python dependencies
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip
pip install psutil
pip install crcengine
2022-05-18 22:33:54 +00:00
pip install 'pyinstaller<5.1'
2022-02-16 06:34:45 +00:00
pip install ujson
pip install pyserial
pip install numpy
pip install structlog
pip install colorama
2022-03-30 19:40:29 +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
2022-05-18 22:33:54 +00:00
2022-02-16 06:34:45 +00:00
- 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
2022-05-18 22:33:54 +00:00
2022-02-16 06:34:45 +00:00
- name: Build Windows Daemon and TNC
if: matrix.os == 'windows-latest'
working-directory: tnc
2022-05-18 22:33:54 +00:00
run: |
2022-02-16 06:34:45 +00:00
pyinstaller freedata.spec
2022-05-18 22:33:54 +00:00
2022-02-22 15:08:56 +00:00
- name: Copy TNC to GUI
shell: bash
2022-05-18 22:33:54 +00:00
run: |
cp -R ./tnc/dist/tnc ./gui/tnc
2022-02-16 06:34:45 +00:00
- name: LIST ALL FILES
shell: bash
run: |
2022-05-18 22:33:54 +00:00
ls -R
- name: Archive TNC
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: '${{ matrix.zip_name }}.zip'
directory: ./tnc/dist/tnc
path: .
2022-05-18 22:33:54 +00:00
#exclusions: '*.git* /*node_modules/* .editorconfig'
- name: LIST ALL FILES
shell: bash
working-directory: tnc
run: |
ls -R
2022-05-18 22:33:54 +00:00
2022-02-16 06:34:45 +00:00
#- name: Build codec2
# shell: bash
# run: |
# choco install ninja cmake
# ninja --version
2022-05-18 22:33:54 +00:00
# cmake --version
2022-02-16 06:34:45 +00:00
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
2022-05-18 22:33:54 +00:00
node-version: 16
- 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-05-18 22:33:54 +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"
2022-05-18 22:33:54 +00:00