Merge pull request #245 from DJ2LS/ls-build-with-nuitka

This commit is contained in:
DJ2LS 2022-09-10 19:42:02 +02:00 committed by GitHub
commit 0459dfbc26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,7 @@ jobs:
BUILD_ON_MULTIARCH:
# The host should always be linux
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
# Run steps on a matrix of 3 arch/distro combinations
@ -112,10 +112,10 @@ jobs:
include:
- arch: armv7
distro: bullseye
libcodec2_os_name: libcodec2_ubuntu-bullseye_armv7.so
libcodec2_os_name: libcodec2_bullseye_armv7.so
- arch: armv7
distro: ubuntu20.04
libcodec2_os_name: libcodec2_ubuntu-2004_armv7.so
distro: ubuntu_latest
libcodec2_os_name: libcodec2_ubuntu_latest_armv7.so
steps:
- uses: actions/checkout@v2.1.0
@ -139,7 +139,7 @@ jobs:
# Pass some environment variables to the container
env: | # YAML, but pipe character is necessary
artifact_name: libcodec2_${{ matrix.distro }}_${{ matrix.arch }}.so
artifact_name: ${{ matrix.libcodec2_os_name }}
# The shell to run commands with in the container
shell: /bin/sh
@ -181,16 +181,18 @@ jobs:
make
mv ./src/libcodec2.so.1.0 /artifacts/${artifact_name}
- name: Show the artifact
- name: Show recursive PWD
# Items placed in /artifacts in the container will be in
# ${PWD}/artifacts on the host.
run: |
ls -al "${PWD}/artifacts"
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.libcodec2_os_name }}
path: $GITHUB_WORKSPACE/codec2/artifacts/*
#path: $GITHUB_WORKSPACE/codec2/artifacts/*
path: artifacts/*
build_i686_x64_release:
needs: [BUILD_ON_MULTIARCH, BUILD_ON_AMD64]
@ -203,14 +205,20 @@ jobs:
- os: ubuntu-20.04
zip_name: ubuntu_tnc
generator: Unix Makefiles
daemon_binary_name: freedata-daemon
tnc_binary_name: freedata-tnc
- os: macos-11
zip_name: macos_tnc
generator: Unix Makefiles
daemon_binary_name: freedata-daemon
tnc_binary_name: freedata-tnc
- os: windows-latest
zip_name: windows_tnc
generator: Visual Studio 16 2019
daemon_binary_name: freedata-daemon.exe
tnc_binary_name: freedata-tnc.exe
steps:
- name: Checkout code
uses: actions/checkout@v3
@ -228,7 +236,7 @@ jobs:
run: |
sudo apt install portaudio19-dev libhamlib-dev libhamlib-utils build-essential cmake python3-libhamlib2
- name: Install macOS dependencies
- name: Install macOS pyAudio
if: matrix.os == 'macos-11'
run: |
brew install portaudio
@ -249,6 +257,8 @@ jobs:
pip install sounddevice
# 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
pip install nuitka
pip install ordered-set
- name: Install Pyaudio Windows
@ -279,10 +289,28 @@ jobs:
- name: Display structure of downloaded files
run: ls -R
- name: Build Linux Daemon
- name: Build binaries
working-directory: tnc
run: |
pyinstaller freedata.spec
#pyinstaller freedata.spec
python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --onefile daemon.py -o ${{ matrix.daemon_binary_name }}
python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --onefile main.py -o ${{ matrix.tnc_binary_name }}
- name: Copy binaries
working-directory: tnc
run: |
mkdir dist
ls -R
cp ${{ matrix.daemon_binary_name }} dist/
cp ${{ matrix.tnc_binary_name }} dist/
- name: Install Pyaudio Windows
if: matrix.os == 'windows-latest'
working-directory: tnc/lib/pyaudio/windows
run: |
pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
- name: LIST ALL FILES
shell: bash
@ -296,12 +324,19 @@ jobs:
# cd ./tnc/dist
# zip -r ./${{ matrix.zip_name }}.zip *
- name: Copy TNC to GUI Linux
run: |
#cp -R ./tnc/dist/tnc ./gui/tnc
cp -R ./tnc/dist ./gui/tnc
ls -R
- name: Compress TNC
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: '${{ matrix.zip_name }}.zip'
directory: ./tnc/dist/tnc
#directory: ./tnc/dist/tnc
directory: ./tnc/dist
path: .
#exclusions: '*.git* /*node_modules/* .editorconfig'
@ -314,12 +349,8 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.zip_name }}.zip
path: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
- name: Copy TNC to GUI Linux
run: |
cp -R ./tnc/dist/tnc ./gui/tnc
ls -R
#path: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
path: ./tnc/dist/${{ matrix.zip_name }}.zip
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
@ -330,7 +361,8 @@ jobs:
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
#files: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
files: ./tnc/dist/${{ matrix.zip_name }}.zip
- name: Build/release Electron app