updated github action

This commit is contained in:
DJ2LS 2023-10-20 21:13:55 +02:00
parent bb512c123e
commit 1adb4f1890

View file

@ -197,24 +197,24 @@ jobs:
os: [ubuntu-20.04, macos-11, windows-latest] os: [ubuntu-20.04, macos-11, windows-latest]
include: include:
- os: ubuntu-20.04 - os: ubuntu-20.04
zip_name: ubuntu_tnc zip_name: ubuntu_modem
generator: Unix Makefiles generator: Unix Makefiles
daemon_binary_name: freedata-daemon daemon_binary_name: freedata-daemon
tnc_binary_name: freedata-modem modem_binary_name: freedata-modem
electron_parameters: "-p always" electron_parameters: "-p always"
- os: macos-11 - os: macos-11
zip_name: macos_tnc zip_name: macos_modem
generator: Unix Makefiles generator: Unix Makefiles
daemon_binary_name: freedata-daemon daemon_binary_name: freedata-daemon
tnc_binary_name: freedata-modem modem_binary_name: freedata-modem
electron_parameters: "-p always" electron_parameters: "-p always"
- os: windows-latest - os: windows-latest
zip_name: windows_tnc zip_name: windows_modem
generator: Visual Studio 16 2019 generator: Visual Studio 16 2019
daemon_binary_name: freedata-daemon.exe daemon_binary_name: freedata-daemon.exe
tnc_binary_name: freedata-modem.exe modem_binary_name: freedata-modem.exe
electron_parameters: "-p always --x64 --ia32" electron_parameters: "-p always --x64 --ia32"
steps: steps:
- name: Checkout code for ${{ matrix.platform.name }} - name: Checkout code for ${{ matrix.platform.name }}
@ -240,9 +240,9 @@ jobs:
- name: Create modem/dist/modem - name: Create modem/dist/modem
working-directory: modem working-directory: modem
run: | run: |
mkdir -p dist/tnc mkdir -p dist/modem
##- name: Download libcodec2 artifact TNC DIST ##- name: Download libcodec2 artifact Modem DIST
## uses: actions/download-artifact@v3 ## uses: actions/download-artifact@v3
## with: ## with:
## path: modem/dist/codec2 ## path: modem/dist/codec2
@ -252,7 +252,7 @@ jobs:
run: | run: |
mkdir codec2 mkdir codec2
- name: Download libcodec2 artifact TNC LIB - name: Download libcodec2 artifact Modem LIB
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
path: modem/lib/codec2 path: modem/lib/codec2
@ -287,11 +287,11 @@ jobs:
if: ${{startsWith(matrix.os, 'macos')}} if: ${{startsWith(matrix.os, 'macos')}}
working-directory: modem working-directory: modem
run: | run: |
# now build tnc binaries # now build modem binaries
pyinstaller -y freedata.spec pyinstaller -y freedata.spec
# and to some final cleanup # and to some final cleanup
# cp -r -f dist/tnc/* dist/ # cp -r -f dist/modem/* dist/
# rm -r dist/tnc # rm -r dist/modem
- name: Build binaries Linux and Windows - name: Build binaries Linux and Windows
if: ${{!startsWith(matrix.os, 'macos')}} if: ${{!startsWith(matrix.os, 'macos')}}
@ -299,7 +299,7 @@ jobs:
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.modem_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
@ -307,24 +307,24 @@ jobs:
if: ${{startsWith(matrix.os, 'ubuntu')}} if: ${{startsWith(matrix.os, 'ubuntu')}}
working-directory: modem working-directory: modem
run: | run: |
cp -r -f daemon.dist/* dist/tnc cp -r -f daemon.dist/* dist/modem
cp -r -f main.dist/* dist/tnc cp -r -f main.dist/* dist/modem
- name: Copy binaries - Windows - name: Copy binaries - Windows
if: ${{startsWith(matrix.os, 'windows')}} if: ${{startsWith(matrix.os, 'windows')}}
working-directory: modem working-directory: modem
# These are powershell aliases, not UNIX commands. # These are powershell aliases, not UNIX commands.
run: | run: |
cp -r -Force daemon.dist/* dist/tnc cp -r -Force daemon.dist/* dist/modem
cp -r -Force main.dist/* dist/tnc cp -r -Force main.dist/* dist/modem
- name: Rename modem binaries - name: Rename modem binaries
# we don't need renaming for pyinstaller builds as output name is defined # we don't need renaming for pyinstaller builds as output name is defined
if: ${{!startsWith(matrix.os, 'macos')}} if: ${{!startsWith(matrix.os, 'macos')}}
working-directory: modem working-directory: modem
run: | run: |
mv dist/tnc/daemon* dist/tnc/${{ matrix.daemon_binary_name }} mv dist/modem/daemon* dist/modem/${{ matrix.daemon_binary_name }}
mv dist/tnc/main* dist/tnc/${{ matrix.tnc_binary_name }} mv dist/modem/main* dist/modem/${{ matrix.modem_binary_name }}
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
@ -338,18 +338,18 @@ jobs:
if: ${{!startsWith(matrix.os, 'windows')}} if: ${{!startsWith(matrix.os, 'windows')}}
working-directory: modem working-directory: modem
run: | run: |
if ! test -d "dist/tnc/_sounddevice_data"; then if ! test -d "dist/modem/_sounddevice_data"; then
git clone https://github.com/spatialaudio/portaudio-binaries dist/tnc/_sounddevice_data/portaudio-binaries git clone https://github.com/spatialaudio/portaudio-binaries dist/modem/_sounddevice_data/portaudio-binaries
fi fi
- name: Download Portaudio binaries Windows - name: Download Portaudio binaries Windows
if: ${{startsWith(matrix.os, 'windows')}} if: ${{startsWith(matrix.os, 'windows')}}
working-directory: modem working-directory: modem
run: | run: |
if(Test-Path -Path "dist/tnc/_sounddevice_data"){ if(Test-Path -Path "dist/modem/_sounddevice_data"){
echo "sounddevice folder already exists" echo "sounddevice folder already exists"
} else { } else {
git clone https://github.com/spatialaudio/portaudio-binaries dist/tnc/_sounddevice_data/portaudio-binaries git clone https://github.com/spatialaudio/portaudio-binaries dist/modem/_sounddevice_data/portaudio-binaries
} }
- name: LIST ALL FILES - name: LIST ALL FILES
@ -377,7 +377,7 @@ jobs:
args: ${{ matrix.electron_parameters }} args: ${{ matrix.electron_parameters }}
max_attempts: 3 max_attempts: 3
- name: Compress TNC - name: Compress Modem
uses: thedoctor0/zip-release@master uses: thedoctor0/zip-release@master
with: with:
type: 'zip' type: 'zip'
@ -387,7 +387,7 @@ jobs:
path: . path: .
# exclusions: '*.git* /*node_modules/* .editorconfig' # exclusions: '*.git* /*node_modules/* .editorconfig'
- name: Release TNC - name: Release Modem
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:
@ -397,7 +397,7 @@ jobs:
- name: LIST ALL FILES - name: LIST ALL FILES
run: ls -R run: ls -R
#- name: Upload TNC artifacts #- name: Upload Modem artifacts
# uses: actions/upload-artifact@v3 # uses: actions/upload-artifact@v3
# if: ${{!startsWith(github.ref, 'refs/tags/v')}} # if: ${{!startsWith(github.ref, 'refs/tags/v')}}
# with: # with: