2022-07-06 13:40:57 +00:00
|
|
|
name: Build_Multiplatform
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
2022-09-18 23:50:20 +00:00
|
|
|
BUILD_AMD64:
|
|
|
|
name: Build codec2 for x86/x64 devices
|
2022-07-06 13:40:57 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-07-12 08:57:06 +00:00
|
|
|
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, macos-11, macos-12]
|
|
|
|
platform: [{name: "native"}, {name: "Windows", file: "dll"}]
|
|
|
|
architecture: [i686-w64-mingw32, x86_64-w64-mingw32]
|
2022-07-06 13:40:57 +00:00
|
|
|
include:
|
|
|
|
- os: ubuntu-18.04
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_name: libcodec2.so.1.0
|
2022-07-08 17:14:22 +00:00
|
|
|
libcodec2_os_name: libcodec2_ubuntu-1804
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_filetype: so
|
2022-07-06 13:40:57 +00:00
|
|
|
generator: Unix Makefiles
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- os: ubuntu-20.04
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_name: libcodec2.so.1.0
|
2022-07-08 17:14:22 +00:00
|
|
|
libcodec2_os_name: libcodec2_ubuntu-2004
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_filetype: so
|
2022-07-06 13:40:57 +00:00
|
|
|
generator: Unix Makefiles
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- os: ubuntu-22.04
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_name: libcodec2.so.1.0
|
2022-07-08 17:14:22 +00:00
|
|
|
libcodec2_os_name: libcodec2_ubuntu-2204
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_filetype: so
|
2022-07-06 13:40:57 +00:00
|
|
|
generator: Unix Makefiles
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- os: macos-11
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_name: libcodec2.1.0.dylib
|
2022-07-08 17:14:22 +00:00
|
|
|
libcodec2_os_name: libcodec2_macos-11
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_filetype: dylib
|
2022-07-06 13:40:57 +00:00
|
|
|
generator: Unix Makefiles
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- os: macos-12
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_name: libcodec2.1.0.dylib
|
2022-07-08 17:14:22 +00:00
|
|
|
libcodec2_os_name: libcodec2_macos-12
|
2022-07-12 08:57:06 +00:00
|
|
|
libcodec2_filetype: dylib
|
2022-07-06 13:40:57 +00:00
|
|
|
generator: Unix Makefiles
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
2022-09-18 23:50:20 +00:00
|
|
|
- name: Build codec2 on ${{ matrix.os }} for ${{ matrix.platform.name }}
|
2022-07-12 08:57:06 +00:00
|
|
|
if: ${{startsWith(matrix.platform.name, 'native') }}
|
2022-07-06 13:40:57 +00:00
|
|
|
run: |
|
|
|
|
git clone https://github.com/drowe67/codec2.git
|
|
|
|
cd codec2
|
|
|
|
mkdir build
|
2022-07-12 08:57:06 +00:00
|
|
|
mkdir tempfiles
|
2022-07-06 13:40:57 +00:00
|
|
|
cd build
|
|
|
|
cmake ../
|
|
|
|
make
|
2022-07-12 08:57:06 +00:00
|
|
|
mv src/${{ matrix.libcodec2_name }} ../tempfiles/libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}.${{ matrix.libcodec2_filetype }}
|
2022-09-18 23:50:20 +00:00
|
|
|
|
|
|
|
- name: LIST ALL FILES ${{ github.workspace }}
|
|
|
|
run: ls -R ${{ github.workspace }}
|
2022-07-12 08:57:06 +00:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
if: ${{startsWith(matrix.platform.name, 'native') }}
|
|
|
|
with:
|
|
|
|
name: libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}.${{ matrix.libcodec2_filetype }}
|
|
|
|
# path: ${{ github.workspace }}/codec2/tempfiles/libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}.${{ matrix.libcodec2_filetype }}
|
|
|
|
path: ${{ github.workspace }}/codec2/tempfiles/
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2022-07-08 17:14:22 +00:00
|
|
|
|
2022-09-18 20:53:36 +00:00
|
|
|
- name: Build codec2 ${{ matrix.platform.name }} ${{ matrix.architecture }}
|
2022-09-18 23:50:20 +00:00
|
|
|
if: ${{startsWith(matrix.os, 'ubuntu-20') && !startsWith(matrix.platform.name, 'native') }}
|
2022-07-06 13:40:57 +00:00
|
|
|
run: |
|
2022-07-12 08:57:06 +00:00
|
|
|
sudo apt install build-essential mingw-w64 g++-mingw-w64 make cmake
|
2022-07-06 13:40:57 +00:00
|
|
|
git clone https://github.com/drowe67/codec2.git
|
|
|
|
cd codec2
|
2022-07-12 09:04:56 +00:00
|
|
|
mkdir tempfiles
|
2022-07-12 08:57:06 +00:00
|
|
|
mkdir build_w32
|
|
|
|
cd build_w32
|
|
|
|
echo 'set(CMAKE_SYSTEM_NAME ${{ matrix.platform.name }})' > toolchain-ubuntu-mingw32.cmake
|
|
|
|
echo 'set(CMAKE_C_COMPILER ${{ matrix.architecture }}-gcc)' >> toolchain-ubuntu-mingw32.cmake
|
|
|
|
echo 'set(CMAKE_CXX_COMPILER ${{ matrix.architecture }}-g++)' >> toolchain-ubuntu-mingw32.cmake
|
2022-07-12 09:04:56 +00:00
|
|
|
echo 'set(CMAKE_RC_COMPILER ${{ matrix.architecture }}-windres)' >> toolchain-ubuntu-mingw32.cmake
|
2022-07-12 08:57:06 +00:00
|
|
|
echo 'set(CMAKE_FIND_ROOT_PATH /usr/${{ matrix.architecture }})' >> toolchain-ubuntu-mingw32.cmake
|
|
|
|
echo 'set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)' >> toolchain-ubuntu-mingw32.cmake
|
|
|
|
echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)' >> toolchain-ubuntu-mingw32.cmake
|
|
|
|
echo 'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)' >> toolchain-ubuntu-mingw32.cmake
|
|
|
|
echo 'set(CMAKE_SHARED_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")' >> toolchain-ubuntu-mingw32.cmake
|
|
|
|
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-ubuntu-mingw32.cmake ..
|
2022-07-06 13:40:57 +00:00
|
|
|
make
|
2022-07-12 08:57:06 +00:00
|
|
|
mv src/libcodec2.${{ matrix.platform.file }} ../tempfiles/libcodec2_${{ matrix.platform.name }}_${{ matrix.architecture }}.${{ matrix.platform.file }}
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v3
|
2022-09-18 23:50:20 +00:00
|
|
|
if: ${{startsWith(matrix.os, 'ubuntu-20') && !startsWith(matrix.platform.name, 'native') }}
|
2022-07-06 13:40:57 +00:00
|
|
|
with:
|
2022-07-12 08:57:06 +00:00
|
|
|
name: libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}_${{ matrix.architecture }}.${{ matrix.platform.file }}
|
|
|
|
path: codec2/tempfiles/*
|
|
|
|
|
|
|
|
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
BUILD_ARM:
|
2022-07-06 13:40:57 +00:00
|
|
|
# The host should always be linux
|
2022-09-06 14:18:08 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-09-18 23:50:20 +00:00
|
|
|
name: Build codec2 for ARM devices
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
# Run steps on a matrix of 2 arch/distro combinations
|
2022-07-06 13:40:57 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- arch: armv7
|
|
|
|
distro: bullseye
|
2022-09-06 17:07:00 +00:00
|
|
|
libcodec2_os_name: libcodec2_bullseye_armv7.so
|
2022-09-06 14:22:08 +00:00
|
|
|
- arch: armv7
|
|
|
|
distro: ubuntu_latest
|
2022-09-06 17:07:00 +00:00
|
|
|
libcodec2_os_name: libcodec2_ubuntu_latest_armv7.so
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
steps:
|
2022-09-17 14:31:19 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-06 13:40:57 +00:00
|
|
|
- uses: uraimo/run-on-arch-action@v2
|
|
|
|
name: Build artifact
|
|
|
|
id: build
|
|
|
|
with:
|
|
|
|
arch: ${{ matrix.arch }}
|
|
|
|
distro: ${{ matrix.distro }}
|
|
|
|
|
|
|
|
# Not required, but speeds up builds
|
|
|
|
githubToken: ${{ github.token }}
|
|
|
|
|
|
|
|
# Create an artifacts directory
|
|
|
|
setup: |
|
|
|
|
mkdir -p "${PWD}/artifacts"
|
|
|
|
|
|
|
|
# Mount the artifacts directory as /artifacts in the container
|
|
|
|
dockerRunArgs: |
|
|
|
|
--volume "${PWD}/artifacts:/artifacts"
|
|
|
|
|
|
|
|
# Pass some environment variables to the container
|
|
|
|
env: | # YAML, but pipe character is necessary
|
2022-09-06 17:07:00 +00:00
|
|
|
artifact_name: ${{ matrix.libcodec2_os_name }}
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
# The shell to run commands with in the container
|
|
|
|
shell: /bin/sh
|
|
|
|
|
|
|
|
# Install some dependencies in the container. This speeds up builds if
|
|
|
|
# you are also using githubToken. Any dependencies installed here will
|
|
|
|
# be part of the container image that gets cached, so subsequent
|
|
|
|
# builds don't have to re-install them. The image layer is cached
|
|
|
|
# publicly in your project's package repository, so it is vital that
|
|
|
|
# no secrets are present in the container state or logs.
|
|
|
|
install: |
|
|
|
|
case "${{ matrix.distro }}" in
|
|
|
|
ubuntu*|jessie|stretch|buster|bullseye)
|
|
|
|
apt-get update -q -y
|
2022-09-05 07:20:59 +00:00
|
|
|
apt-get install -q -y git build-essential cmake gcc g++
|
|
|
|
cmake --version
|
2022-07-06 13:40:57 +00:00
|
|
|
;;
|
|
|
|
fedora*)
|
|
|
|
dnf -y update
|
2022-09-18 23:50:20 +00:00
|
|
|
dnf -y install git which make cmake gcc-c++ gcc
|
2022-09-05 07:20:59 +00:00
|
|
|
cmake --version
|
2022-07-06 13:40:57 +00:00
|
|
|
;;
|
|
|
|
alpine*)
|
|
|
|
apk update
|
2022-09-18 23:50:20 +00:00
|
|
|
apk add git cmake gcc g++
|
2022-09-05 07:20:59 +00:00
|
|
|
cmake --version
|
2022-07-06 13:40:57 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Produce a binary artifact and place it in the mounted volume
|
2022-07-08 17:14:22 +00:00
|
|
|
run: |
|
2022-09-20 06:04:38 +00:00
|
|
|
|
2022-07-06 13:40:57 +00:00
|
|
|
git clone https://github.com/drowe67/codec2.git
|
|
|
|
cd codec2
|
|
|
|
git checkout master
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ../
|
|
|
|
make
|
2022-09-06 18:19:30 +00:00
|
|
|
mv ./src/libcodec2.so.1.0 /artifacts/${artifact_name}
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2022-09-18 20:53:36 +00:00
|
|
|
- name: Show recursive PWD/artifacts
|
2022-07-06 13:40:57 +00:00
|
|
|
# Items placed in /artifacts in the container will be in
|
|
|
|
# ${PWD}/artifacts on the host.
|
2022-09-18 23:50:20 +00:00
|
|
|
run: ls -al "${PWD}/artifacts"
|
2022-09-06 17:07:00 +00:00
|
|
|
|
2022-07-06 13:40:57 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.libcodec2_os_name }}
|
2022-09-06 15:02:11 +00:00
|
|
|
#path: $GITHUB_WORKSPACE/codec2/artifacts/*
|
2022-09-06 17:07:00 +00:00
|
|
|
path: artifacts/*
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
build_i686_x64_release:
|
2022-09-18 23:50:20 +00:00
|
|
|
needs: [BUILD_AMD64]
|
|
|
|
name: Build FreeDATA packages
|
2022-07-06 13:40:57 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-20.04, macos-11, windows-latest]
|
|
|
|
include:
|
|
|
|
- os: ubuntu-20.04
|
|
|
|
zip_name: ubuntu_tnc
|
|
|
|
generator: Unix Makefiles
|
2022-09-06 15:02:11 +00:00
|
|
|
daemon_binary_name: freedata-daemon
|
|
|
|
tnc_binary_name: freedata-tnc
|
2022-10-04 06:58:02 +00:00
|
|
|
electron_parameters: "-p always"
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
- os: macos-11
|
|
|
|
zip_name: macos_tnc
|
|
|
|
generator: Unix Makefiles
|
2022-09-06 15:02:11 +00:00
|
|
|
daemon_binary_name: freedata-daemon
|
|
|
|
tnc_binary_name: freedata-tnc
|
2022-10-04 06:58:02 +00:00
|
|
|
electron_parameters: "-p always"
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
- os: windows-latest
|
|
|
|
zip_name: windows_tnc
|
|
|
|
generator: Visual Studio 16 2019
|
2022-09-06 18:19:30 +00:00
|
|
|
daemon_binary_name: freedata-daemon.exe
|
|
|
|
tnc_binary_name: freedata-tnc.exe
|
2022-10-04 06:58:02 +00:00
|
|
|
electron_parameters: "-p always --x64 --ia32"
|
2022-07-06 13:40:57 +00:00
|
|
|
steps:
|
2022-09-18 23:50:20 +00:00
|
|
|
- name: Checkout code for ${{ matrix.platform.name }}
|
2022-07-06 13:40:57 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: DJ2LS/FreeDATA
|
|
|
|
|
|
|
|
- name: Set up Python 3.9
|
2022-09-17 14:31:16 +00:00
|
|
|
uses: actions/setup-python@v4
|
2022-07-06 13:40:57 +00:00
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
|
2023-01-19 20:15:23 +00:00
|
|
|
- name: Install Node.js, NPM and Yarn
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
- name: Create tnc/dist
|
2022-09-12 16:17:35 +00:00
|
|
|
working-directory: tnc
|
|
|
|
run: |
|
2022-09-18 20:53:36 +00:00
|
|
|
mkdir -p dist
|
2022-09-12 16:17:35 +00:00
|
|
|
|
2023-01-19 20:15:23 +00:00
|
|
|
- name: Create tnc/dist/tnc
|
|
|
|
working-directory: tnc
|
|
|
|
run: |
|
|
|
|
mkdir -p dist/tnc
|
|
|
|
|
|
|
|
##- name: Download libcodec2 artifact TNC DIST
|
|
|
|
## uses: actions/download-artifact@v3
|
|
|
|
## with:
|
|
|
|
## path: tnc/dist/codec2
|
|
|
|
|
|
|
|
- name: create tnc/lib/codec2
|
|
|
|
working-directory: tnc/lib/
|
|
|
|
run: |
|
|
|
|
mkdir codec2
|
|
|
|
|
|
|
|
- name: Download libcodec2 artifact TNC LIB
|
2022-09-18 23:50:20 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2022-09-12 16:17:35 +00:00
|
|
|
with:
|
2023-01-19 20:15:23 +00:00
|
|
|
path: tnc/lib/codec2
|
|
|
|
|
2022-09-12 16:17:35 +00:00
|
|
|
|
2022-07-06 13:40:57 +00:00
|
|
|
- name: Install Linux dependencies
|
2022-09-18 23:50:20 +00:00
|
|
|
# if: matrix.os == 'ubuntu-20.04'
|
|
|
|
if: ${{startsWith(matrix.os, 'ubuntu')}}
|
2022-07-06 13:40:57 +00:00
|
|
|
run: |
|
2023-01-19 20:15:23 +00:00
|
|
|
sudo apt install -y portaudio19-dev libhamlib-dev libhamlib-utils build-essential cmake python3-libhamlib2 patchelf
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2022-09-18 20:53:36 +00:00
|
|
|
- name: Install MacOS pyAudio
|
2022-09-18 23:50:20 +00:00
|
|
|
if: ${{startsWith(matrix.os, 'macos')}}
|
2022-07-06 13:40:57 +00:00
|
|
|
run: |
|
|
|
|
brew install portaudio
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip3 install pyaudio
|
|
|
|
|
|
|
|
- name: Install Python dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2023-01-19 20:15:23 +00:00
|
|
|
pip install -r requirements.txt
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
# - name: Install Pyaudio Windows
|
|
|
|
# if: ${{startsWith(matrix.os, 'windows')}}
|
|
|
|
# working-directory: tnc/lib/pyaudio/windows
|
|
|
|
# run: |
|
|
|
|
# pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
# - name: Display structure of downloaded files
|
|
|
|
# run: ls -R
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
# - name: cleanup codec2
|
|
|
|
# working-directory: tnc/lib/
|
|
|
|
# run: |
|
|
|
|
# mkdir codec2
|
|
|
|
# cd codec2
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
# - uses: actions/download-artifact@v3
|
|
|
|
# with:
|
|
|
|
# path: tnc/lib/codec2
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
|
2022-10-12 10:00:54 +00:00
|
|
|
- name: Build binaries macOS
|
|
|
|
if: ${{startsWith(matrix.os, 'macos')}}
|
|
|
|
working-directory: tnc
|
|
|
|
run: |
|
2022-10-13 07:53:53 +00:00
|
|
|
#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
|
|
|
|
pyinstaller freedata.spec
|
|
|
|
cp -r -f dist/tnc/* dist/
|
2022-10-13 08:36:04 +00:00
|
|
|
rm -r dist/tnc
|
2022-10-12 10:00:54 +00:00
|
|
|
|
|
|
|
- name: Build binaries Linux and Windows
|
|
|
|
if: ${{!startsWith(matrix.os, 'macos')}}
|
2022-07-06 13:40:57 +00:00
|
|
|
working-directory: tnc
|
|
|
|
run: |
|
2022-09-18 23:50:20 +00:00
|
|
|
# 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 }}
|
2022-09-10 13:26:06 +00:00
|
|
|
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
|
2022-09-06 18:19:30 +00:00
|
|
|
|
2023-01-19 20:15:23 +00:00
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
|
2022-10-13 08:15:51 +00:00
|
|
|
- name: Copy binaries - Linux
|
|
|
|
if: ${{startsWith(matrix.os, 'ubuntu')}}
|
2022-09-06 18:19:30 +00:00
|
|
|
working-directory: tnc
|
|
|
|
run: |
|
2023-01-19 20:15:23 +00:00
|
|
|
cp -r -f daemon.dist/* dist/tnc
|
|
|
|
cp -r -f main.dist/* dist/tnc
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
- name: Copy binaries - Windows
|
|
|
|
if: ${{startsWith(matrix.os, 'windows')}}
|
2022-09-10 18:10:05 +00:00
|
|
|
working-directory: tnc
|
2022-09-18 23:50:20 +00:00
|
|
|
# These are powershell aliases, not UNIX commands.
|
2022-09-10 18:10:05 +00:00
|
|
|
run: |
|
2023-01-19 20:15:23 +00:00
|
|
|
cp -r -Force daemon.dist/* dist/tnc
|
|
|
|
cp -r -Force main.dist/* dist/tnc
|
2022-09-12 08:25:03 +00:00
|
|
|
|
2022-09-18 23:50:20 +00:00
|
|
|
- name: Rename tnc binaries
|
2022-09-10 15:36:06 +00:00
|
|
|
working-directory: tnc
|
|
|
|
run: |
|
2023-01-19 20:15:23 +00:00
|
|
|
mv dist/tnc/daemon* dist/tnc/${{ matrix.daemon_binary_name }}
|
|
|
|
mv dist/tnc/main* dist/tnc/${{ matrix.tnc_binary_name }}
|
2022-09-10 15:36:06 +00:00
|
|
|
|
2023-01-19 20:15:23 +00:00
|
|
|
- uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
path: tnc/dist/tnc
|
2022-09-12 08:25:03 +00:00
|
|
|
|
2022-07-06 13:40:57 +00:00
|
|
|
- name: LIST ALL FILES
|
2022-09-18 23:50:20 +00:00
|
|
|
run: ls -R
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2023-01-19 20:15:23 +00:00
|
|
|
- name: Download Portaudio binaries
|
|
|
|
working-directory: tnc
|
2022-09-06 14:06:57 +00:00
|
|
|
run: |
|
2023-01-19 20:15:23 +00:00
|
|
|
git clone https://github.com/spatialaudio/portaudio-binaries dist/tnc/_sounddevice_data/portaudio-binaries
|
2022-09-18 23:50:20 +00:00
|
|
|
|
|
|
|
- name: LIST ALL FILES
|
|
|
|
run: ls -R
|
2022-09-06 14:06:57 +00:00
|
|
|
|
2023-01-19 20:15:23 +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') }}
|
|
|
|
args: ${{ matrix.electron_parameters }}
|
|
|
|
|
2022-07-06 13:40:57 +00:00
|
|
|
- name: Compress TNC
|
|
|
|
uses: thedoctor0/zip-release@master
|
|
|
|
with:
|
|
|
|
type: 'zip'
|
|
|
|
filename: '${{ matrix.zip_name }}.zip'
|
2022-09-18 23:50:20 +00:00
|
|
|
# directory: ./tnc/dist/tnc
|
2023-01-19 20:15:23 +00:00
|
|
|
directory: ./tnc/dist/tnc
|
2022-07-06 13:40:57 +00:00
|
|
|
path: .
|
2022-09-18 23:50:20 +00:00
|
|
|
# exclusions: '*.git* /*node_modules/* .editorconfig'
|
2022-07-06 13:40:57 +00:00
|
|
|
|
|
|
|
- name: Release TNC
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
with:
|
2023-01-19 20:15:23 +00:00
|
|
|
files: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
|
|
|
|
#files: ./tnc/dist/${{ matrix.zip_name }}.zip
|
2022-07-06 13:40:57 +00:00
|
|
|
|
2022-09-12 07:16:28 +00:00
|
|
|
- name: LIST ALL FILES
|
2022-09-18 23:50:20 +00:00
|
|
|
run: ls -R
|
2022-09-12 07:16:28 +00:00
|
|
|
|
2023-01-19 20:15:23 +00:00
|
|
|
#- name: Upload TNC artifacts
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# if: ${{!startsWith(github.ref, 'refs/tags/v')}}
|
|
|
|
# with:
|
|
|
|
# name: ${{ matrix.zip_name }}.zip
|
|
|
|
# # path: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
|
|
|
|
# path: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip#
|
|
|
|
|
|
|
|
#- name: Upload App bundle artifacts
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# if: ${{!startsWith(github.ref, 'refs/tags/v')}}
|
|
|
|
# with:
|
|
|
|
# name: app_bundle_${{ matrix.os }}.zip
|
|
|
|
# # path: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
|
|
|
|
# path: ./gui/dist/*
|