mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Make build file more consistent and representative
This commit is contained in:
parent
e189d0298e
commit
7704f96fc3
147
.github/workflows/build_multiplatform.yml
vendored
147
.github/workflows/build_multiplatform.yml
vendored
|
@ -2,8 +2,8 @@ name: Build_Multiplatform
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
BUILD_ON_AMD64:
|
BUILD_AMD64:
|
||||||
name: Build codec2 ${{ matrix.os }}
|
name: Build codec2 for x86/x64 devices
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -49,7 +49,7 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build codec2 ${{ matrix.os }} ${{ matrix.platform.name }}
|
- name: Build codec2 on ${{ matrix.os }} for ${{ matrix.platform.name }}
|
||||||
if: ${{startsWith(matrix.platform.name, 'native') }}
|
if: ${{startsWith(matrix.platform.name, 'native') }}
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/drowe67/codec2.git
|
git clone https://github.com/drowe67/codec2.git
|
||||||
|
@ -60,7 +60,9 @@ jobs:
|
||||||
cmake ../
|
cmake ../
|
||||||
make
|
make
|
||||||
mv src/${{ matrix.libcodec2_name }} ../tempfiles/libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}.${{ matrix.libcodec2_filetype }}
|
mv src/${{ matrix.libcodec2_name }} ../tempfiles/libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}.${{ matrix.libcodec2_filetype }}
|
||||||
ls -R ${{ github.workspace }}
|
|
||||||
|
- name: LIST ALL FILES ${{ github.workspace }}
|
||||||
|
run: ls -R ${{ github.workspace }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{startsWith(matrix.platform.name, 'native') }}
|
if: ${{startsWith(matrix.platform.name, 'native') }}
|
||||||
|
@ -71,7 +73,7 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
- name: Build codec2 ${{ matrix.platform.name }} ${{ matrix.architecture }}
|
- name: Build codec2 ${{ matrix.platform.name }} ${{ matrix.architecture }}
|
||||||
if: ${{startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.platform.name, 'native') }}
|
if: ${{startsWith(matrix.os, 'ubuntu-20') && !startsWith(matrix.platform.name, 'native') }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt install build-essential mingw-w64 g++-mingw-w64 make cmake
|
sudo apt install build-essential mingw-w64 g++-mingw-w64 make cmake
|
||||||
git clone https://github.com/drowe67/codec2.git
|
git clone https://github.com/drowe67/codec2.git
|
||||||
|
@ -93,7 +95,7 @@ jobs:
|
||||||
mv src/libcodec2.${{ matrix.platform.file }} ../tempfiles/libcodec2_${{ matrix.platform.name }}_${{ matrix.architecture }}.${{ matrix.platform.file }}
|
mv src/libcodec2.${{ matrix.platform.file }} ../tempfiles/libcodec2_${{ matrix.platform.name }}_${{ matrix.architecture }}.${{ matrix.platform.file }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.platform.name, 'native') }}
|
if: ${{startsWith(matrix.os, 'ubuntu-20') && !startsWith(matrix.platform.name, 'native') }}
|
||||||
with:
|
with:
|
||||||
name: libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}_${{ matrix.architecture }}.${{ matrix.platform.file }}
|
name: libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}_${{ matrix.architecture }}.${{ matrix.platform.file }}
|
||||||
path: codec2/tempfiles/*
|
path: codec2/tempfiles/*
|
||||||
|
@ -101,12 +103,12 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BUILD_ON_MULTIARCH:
|
BUILD_ARM:
|
||||||
# The host should always be linux
|
# The host should always be linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
|
name: Build codec2 for ARM devices
|
||||||
|
|
||||||
# Run steps on a matrix of 3 arch/distro combinations
|
# Run steps on a matrix of 2 arch/distro combinations
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -159,12 +161,12 @@ jobs:
|
||||||
;;
|
;;
|
||||||
fedora*)
|
fedora*)
|
||||||
dnf -y update
|
dnf -y update
|
||||||
dnf -y install git which build-essential cmake gcc-c++ gcc
|
dnf -y install git which make cmake gcc-c++ gcc
|
||||||
cmake --version
|
cmake --version
|
||||||
;;
|
;;
|
||||||
alpine*)
|
alpine*)
|
||||||
apk update
|
apk update
|
||||||
apk add git build-essential cmake gcc g++
|
apk add git cmake gcc g++
|
||||||
cmake --version
|
cmake --version
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -183,9 +185,7 @@ jobs:
|
||||||
- name: Show recursive PWD/artifacts
|
- name: Show recursive PWD/artifacts
|
||||||
# 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:
|
||||||
|
@ -194,8 +194,8 @@ jobs:
|
||||||
path: artifacts/*
|
path: artifacts/*
|
||||||
|
|
||||||
build_i686_x64_release:
|
build_i686_x64_release:
|
||||||
needs: [BUILD_ON_MULTIARCH, BUILD_ON_AMD64]
|
needs: [BUILD_AMD64]
|
||||||
name: Build FreeDATA
|
name: Build FreeDATA packages
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -219,7 +219,7 @@ jobs:
|
||||||
daemon_binary_name: freedata-daemon.exe
|
daemon_binary_name: freedata-daemon.exe
|
||||||
tnc_binary_name: freedata-tnc.exe
|
tnc_binary_name: freedata-tnc.exe
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code for ${{ matrix.platform.name }}
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: DJ2LS/FreeDATA
|
repository: DJ2LS/FreeDATA
|
||||||
|
@ -230,23 +230,24 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
|
|
||||||
- name: early download of libcodec2
|
- name: Create tnc/dist
|
||||||
if: matrix.os != 'windows-latest'
|
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- name: Download libcodec2 artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: tnc/dist/codec2
|
path: tnc/dist/codec2
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
- name: Install Linux dependencies
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
# if: matrix.os == 'ubuntu-20.04'
|
||||||
|
if: ${{startsWith(matrix.os, 'ubuntu')}}
|
||||||
run: |
|
run: |
|
||||||
sudo apt install -y portaudio19-dev libhamlib-dev libhamlib-utils build-essential cmake python3-libhamlib2
|
sudo apt install -y portaudio19-dev libhamlib-dev libhamlib-utils build-essential cmake python3-libhamlib2
|
||||||
|
|
||||||
- name: Install MacOS pyAudio
|
- name: Install MacOS pyAudio
|
||||||
if: matrix.os == 'macos-11'
|
if: ${{startsWith(matrix.os, 'macos')}}
|
||||||
run: |
|
run: |
|
||||||
brew install portaudio
|
brew install portaudio
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
@ -270,56 +271,59 @@ jobs:
|
||||||
pip install ordered-set
|
pip install ordered-set
|
||||||
|
|
||||||
|
|
||||||
#- name: Install Pyaudio Windows
|
# - name: Install Pyaudio Windows
|
||||||
#if: matrix.os == 'windows-latest'
|
# if: ${{startsWith(matrix.os, 'windows')}}
|
||||||
#working-directory: tnc/lib/pyaudio/windows
|
# working-directory: tnc/lib/pyaudio/windows
|
||||||
#run: |
|
# run: |
|
||||||
# pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
|
# pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
#- name: cleanup codec2
|
|
||||||
# working-directory: tnc/lib/
|
|
||||||
# run: |
|
|
||||||
# mkdir codec2
|
|
||||||
# cd codec2
|
|
||||||
|
|
||||||
#- uses: actions/download-artifact@v3
|
|
||||||
# with:
|
|
||||||
# path: tnc/lib/codec2
|
|
||||||
|
|
||||||
# - name: Display structure of downloaded files
|
# - name: Display structure of downloaded files
|
||||||
# run: ls -R
|
# run: ls -R
|
||||||
|
|
||||||
|
# - name: cleanup codec2
|
||||||
|
# working-directory: tnc/lib/
|
||||||
|
# run: |
|
||||||
|
# mkdir codec2
|
||||||
|
# cd codec2
|
||||||
|
|
||||||
|
# - uses: actions/download-artifact@v3
|
||||||
|
# with:
|
||||||
|
# path: tnc/lib/codec2
|
||||||
|
|
||||||
|
- name: Display structure of downloaded files
|
||||||
|
run: ls -R
|
||||||
|
|
||||||
- name: Build binaries
|
- 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 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 }}
|
# python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --onefile main.py -o ${{ matrix.tnc_binary_name }}
|
||||||
python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --standalone daemon.py
|
python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --standalone daemon.py
|
||||||
python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --standalone main.py
|
python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --standalone main.py
|
||||||
|
|
||||||
- name: Copy binaries linux and MacOS
|
- name: LIST ALL FILES
|
||||||
if: matrix.os != 'windows-latest'
|
run: ls -R
|
||||||
|
|
||||||
|
- name: Copy binaries - Linux and MacOS
|
||||||
|
if: ${{!startsWith(matrix.os, 'windows')}}
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
#mkdir dist
|
cp -r -f daemon.dist/* dist/
|
||||||
ls -R
|
cp -r -f main.dist/* dist/
|
||||||
cp -r --force daemon.dist/* dist/
|
|
||||||
cp -r --force main.dist/* dist/
|
|
||||||
|
|
||||||
- name: Copy binaries windows
|
- name: LIST ALL FILES
|
||||||
if: matrix.os == 'windows-latest'
|
run: ls -R
|
||||||
|
|
||||||
|
- name: Copy binaries - Windows
|
||||||
|
if: ${{startsWith(matrix.os, 'windows')}}
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
|
# These are powershell aliases, not UNIX commands.
|
||||||
run: |
|
run: |
|
||||||
#mkdir dist
|
cp -r -Force daemon.dist/* dist/
|
||||||
ls -R
|
cp -r -Force main.dist/* dist/
|
||||||
cp -r --force daemon.dist/* dist/
|
|
||||||
cp -r --force main.dist/* dist/
|
|
||||||
|
|
||||||
- name: rename tnc binaries
|
- name: Rename tnc binaries
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
mv dist/daemon* dist/${{ matrix.daemon_binary_name }}
|
mv dist/daemon* dist/${{ matrix.daemon_binary_name }}
|
||||||
|
@ -335,9 +339,7 @@ jobs:
|
||||||
# path: tnc/dist/codec2
|
# path: tnc/dist/codec2
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
shell: bash
|
run: ls -R
|
||||||
run: |
|
|
||||||
ls -R
|
|
||||||
|
|
||||||
#- name: Compress TNC
|
#- name: Compress TNC
|
||||||
# # if: ${{!startsWith(matrix.os, 'windows') }}
|
# # if: ${{!startsWith(matrix.os, 'windows') }}
|
||||||
|
@ -346,32 +348,32 @@ 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
|
- name: Copy TNC to GUI
|
||||||
run: |
|
run: |
|
||||||
#cp -R ./tnc/dist/tnc ./gui/tnc
|
# cp -R ./tnc/dist/tnc ./gui/tnc
|
||||||
cp -R ./tnc/dist ./gui/tnc
|
cp -R ./tnc/dist ./gui/tnc
|
||||||
ls -R
|
|
||||||
|
- name: LIST ALL FILES
|
||||||
|
run: 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
|
directory: ./tnc/dist
|
||||||
path: .
|
path: .
|
||||||
#exclusions: '*.git* /*node_modules/* .editorconfig'
|
# exclusions: '*.git* /*node_modules/* .editorconfig'
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
shell: bash
|
run: ls -R
|
||||||
run: |
|
|
||||||
ls -R
|
|
||||||
|
|
||||||
- name: Upload TNC artifacts
|
- name: Upload TNC artifacts
|
||||||
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
|
path: ./tnc/dist/${{ matrix.zip_name }}.zip
|
||||||
|
|
||||||
- name: Install Node.js, NPM and Yarn
|
- name: Install Node.js, NPM and Yarn
|
||||||
|
@ -383,10 +385,9 @@ 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
|
files: ./tnc/dist/${{ matrix.zip_name }}.zip
|
||||||
|
|
||||||
|
|
||||||
- name: Build/release Electron app
|
- name: Build/release Electron app
|
||||||
uses: samuelmeuli/action-electron-builder@v1
|
uses: samuelmeuli/action-electron-builder@v1
|
||||||
with:
|
with:
|
||||||
|
@ -398,13 +399,11 @@ jobs:
|
||||||
args: "-p always"
|
args: "-p always"
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
shell: bash
|
run: ls -R
|
||||||
run: |
|
|
||||||
ls -R
|
|
||||||
|
|
||||||
- name: Upload App bundle artifacts
|
- name: Upload App bundle artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: app_bundle_${{ matrix.os }}.zip
|
name: app_bundle_${{ matrix.os }}.zip
|
||||||
#path: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
|
# path: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
|
||||||
path: ./gui/dist/*
|
path: ./gui/dist/*
|
||||||
|
|
Loading…
Reference in a new issue