mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
attempt fixing macOS build with new build steps
This commit is contained in:
parent
a9c415c59e
commit
1bd6537d64
1 changed files with 70 additions and 104 deletions
174
.github/workflows/build_multiplatform.yml
vendored
174
.github/workflows/build_multiplatform.yml
vendored
|
@ -233,51 +233,54 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
|
|
||||||
|
- name: Install Node.js, NPM and Yarn
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
|
||||||
- name: Create tnc/dist
|
- name: Create tnc/dist
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
|
|
||||||
- name: Download libcodec2 artifact
|
- 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
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: tnc/dist/codec2
|
path: tnc/lib/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')}}
|
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 patchelf
|
||||||
|
|
||||||
- name: Install MacOS pyAudio
|
- name: Install MacOS pyAudio
|
||||||
if: ${{startsWith(matrix.os, 'macos')}}
|
if: ${{startsWith(matrix.os, 'macos')}}
|
||||||
run: |
|
run: |
|
||||||
#brew install virtualenv
|
|
||||||
#virtualenv -p python3 venv
|
|
||||||
#cd venv
|
|
||||||
#source ./bin/activate
|
|
||||||
brew install portaudio
|
brew install portaudio
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip3 install pyaudio
|
pip3 install pyaudio
|
||||||
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install psutil
|
pip install -r requirements.txt
|
||||||
pip install crcengine
|
|
||||||
# pip install 'pyinstaller<5.1'
|
|
||||||
pip install ujson
|
|
||||||
pip install pyserial
|
|
||||||
pip install numpy
|
|
||||||
pip install structlog
|
|
||||||
pip install colorama
|
|
||||||
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 pyinstaller
|
|
||||||
pip install ordered-set
|
|
||||||
|
|
||||||
|
|
||||||
# - name: Install Pyaudio Windows
|
# - name: Install Pyaudio Windows
|
||||||
|
@ -299,8 +302,6 @@ jobs:
|
||||||
# with:
|
# with:
|
||||||
# path: tnc/lib/codec2
|
# path: tnc/lib/codec2
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: Build binaries macOS
|
- name: Build binaries macOS
|
||||||
if: ${{startsWith(matrix.os, 'macos')}}
|
if: ${{startsWith(matrix.os, 'macos')}}
|
||||||
|
@ -322,105 +323,44 @@ jobs:
|
||||||
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: LIST ALL FILES
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: Copy binaries - Linux
|
- name: Copy binaries - Linux
|
||||||
if: ${{startsWith(matrix.os, 'ubuntu')}}
|
if: ${{startsWith(matrix.os, 'ubuntu')}}
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
cp -r -f daemon.dist/* dist/
|
cp -r -f daemon.dist/* dist/tnc
|
||||||
cp -r -f main.dist/* dist/
|
cp -r -f main.dist/* dist/tnc
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: Copy binaries - Windows
|
- name: Copy binaries - Windows
|
||||||
if: ${{startsWith(matrix.os, 'windows')}}
|
if: ${{startsWith(matrix.os, 'windows')}}
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
# These are powershell aliases, not UNIX commands.
|
# These are powershell aliases, not UNIX commands.
|
||||||
run: |
|
run: |
|
||||||
cp -r -Force daemon.dist/* dist/
|
cp -r -Force daemon.dist/* dist/tnc
|
||||||
cp -r -Force main.dist/* dist/
|
cp -r -Force main.dist/* dist/tnc
|
||||||
|
|
||||||
- name: Rename tnc binaries
|
- name: Rename tnc binaries
|
||||||
if: ${{!startsWith(matrix.os, 'macos')}}
|
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
mv dist/daemon* dist/${{ matrix.daemon_binary_name }}
|
mv dist/tnc/daemon* dist/tnc/${{ matrix.daemon_binary_name }}
|
||||||
mv dist/main* dist/${{ matrix.tnc_binary_name }}
|
mv dist/tnc/main* dist/tnc/${{ matrix.tnc_binary_name }}
|
||||||
|
|
||||||
- name: Download Portaudio binaries Linux macOS
|
- uses: actions/download-artifact@v3
|
||||||
if: ${{!startsWith(matrix.os, 'windows')}}
|
with:
|
||||||
working-directory: tnc
|
path: tnc/dist/tnc
|
||||||
run: |
|
|
||||||
if ! test -d "dist/_sounddevice_data"; then
|
|
||||||
git clone https://github.com/spatialaudio/portaudio-binaries dist/_sounddevice_data/portaudio-binaries
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Download Portaudio binaries Windows
|
|
||||||
if: ${{startsWith(matrix.os, 'windows')}}
|
|
||||||
working-directory: tnc
|
|
||||||
run: |
|
|
||||||
if(Test-Path -Path "dist/_sounddevice_data"){
|
|
||||||
echo "already exists"
|
|
||||||
} else {
|
|
||||||
git clone https://github.com/spatialaudio/portaudio-binaries dist/_sounddevice_data/portaudio-binaries
|
|
||||||
}
|
|
||||||
#- uses: actions/download-artifact@v3
|
|
||||||
# with:
|
|
||||||
# path: tnc/dist/codec2
|
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|
||||||
#- name: Compress TNC
|
- name: Download Portaudio binaries
|
||||||
# # if: ${{!startsWith(matrix.os, 'windows') }}
|
working-directory: tnc
|
||||||
# shell: bash
|
|
||||||
# run: |
|
|
||||||
# cd ./tnc/dist
|
|
||||||
# zip -r ./${{ matrix.zip_name }}.zip *
|
|
||||||
|
|
||||||
- name: Copy TNC to GUI
|
|
||||||
run: |
|
run: |
|
||||||
# cp -R ./tnc/dist/tnc ./gui/tnc
|
git clone https://github.com/spatialaudio/portaudio-binaries dist/tnc/_sounddevice_data/portaudio-binaries
|
||||||
cp -R ./tnc/dist ./gui/tnc
|
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
run: ls -R
|
run: 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
|
|
||||||
path: .
|
|
||||||
# exclusions: '*.git* /*node_modules/* .editorconfig'
|
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: Upload TNC artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.zip_name }}.zip
|
|
||||||
# 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@v3
|
|
||||||
with:
|
|
||||||
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
|
|
||||||
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:
|
||||||
|
@ -431,12 +371,38 @@ jobs:
|
||||||
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
args: ${{ matrix.electron_parameters }}
|
args: ${{ matrix.electron_parameters }}
|
||||||
|
|
||||||
|
- name: Compress TNC
|
||||||
|
uses: thedoctor0/zip-release@master
|
||||||
|
with:
|
||||||
|
type: 'zip'
|
||||||
|
filename: '${{ matrix.zip_name }}.zip'
|
||||||
|
# directory: ./tnc/dist/tnc
|
||||||
|
directory: ./tnc/dist/tnc
|
||||||
|
path: .
|
||||||
|
# exclusions: '*.git* /*node_modules/* .editorconfig'
|
||||||
|
|
||||||
|
- 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
|
||||||
|
#files: ./tnc/dist/${{ matrix.zip_name }}.zip
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|
||||||
- name: Upload App bundle artifacts
|
#- name: Upload TNC artifacts
|
||||||
uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
with:
|
# if: ${{!startsWith(github.ref, 'refs/tags/v')}}
|
||||||
name: app_bundle_${{ matrix.os }}.zip
|
# with:
|
||||||
# path: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
|
# name: ${{ matrix.zip_name }}.zip
|
||||||
path: ./gui/dist/*
|
# # 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/*
|
Loading…
Reference in a new issue