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