mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Merge pull request #263 from DJ2LS/update_github_action
fixing macOS builds and code signing
This commit is contained in:
commit
679da34ed7
96
.github/workflows/build_multiplatform.yml
vendored
96
.github/workflows/build_multiplatform.yml
vendored
|
@ -100,9 +100,6 @@ jobs:
|
||||||
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/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BUILD_ARM:
|
BUILD_ARM:
|
||||||
# The host should always be linux
|
# The host should always be linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -236,7 +233,7 @@ jobs:
|
||||||
- name: Install Node.js, NPM and Yarn
|
- name: Install Node.js, NPM and Yarn
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
|
||||||
- name: Create tnc/dist
|
- name: Create tnc/dist
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
|
@ -282,27 +279,25 @@ jobs:
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Add MacOS certs
|
||||||
|
if: ${{startsWith(matrix.os, 'macos')}}
|
||||||
|
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh
|
||||||
|
env:
|
||||||
|
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
|
||||||
|
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
|
||||||
|
|
||||||
# - name: Install Pyaudio Windows
|
- name: Build binaries macOS
|
||||||
# if: ${{startsWith(matrix.os, 'windows')}}
|
if: ${{startsWith(matrix.os, 'macos')}}
|
||||||
# working-directory: tnc/lib/pyaudio/windows
|
working-directory: tnc
|
||||||
# run: |
|
run: |
|
||||||
# pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
|
# now build tnc binaries
|
||||||
|
pyinstaller -y freedata.spec
|
||||||
|
# and to some final cleanup
|
||||||
|
cp -r -f dist/tnc/* dist/
|
||||||
|
rm -r dist/tnc
|
||||||
|
|
||||||
# - name: Display structure of downloaded files
|
- name: Build binaries Linux and Windows
|
||||||
# run: ls -R
|
if: ${{!startsWith(matrix.os, 'macos')}}
|
||||||
|
|
||||||
# - name: cleanup codec2
|
|
||||||
# working-directory: tnc/lib/
|
|
||||||
# run: |
|
|
||||||
# mkdir codec2
|
|
||||||
# cd codec2
|
|
||||||
|
|
||||||
# - uses: actions/download-artifact@v3
|
|
||||||
# with:
|
|
||||||
# path: tnc/lib/codec2
|
|
||||||
|
|
||||||
- name: Build binaries
|
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
# pyinstaller freedata.spec
|
# pyinstaller freedata.spec
|
||||||
|
@ -311,8 +306,8 @@ 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: Copy binaries - Linux and MacOS
|
- name: Copy binaries - Linux
|
||||||
if: ${{!startsWith(matrix.os, 'windows')}}
|
if: ${{startsWith(matrix.os, 'ubuntu')}}
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
cp -r -f daemon.dist/* dist/tnc
|
cp -r -f daemon.dist/* dist/tnc
|
||||||
|
@ -327,6 +322,8 @@ jobs:
|
||||||
cp -r -Force main.dist/* dist/tnc
|
cp -r -Force main.dist/* dist/tnc
|
||||||
|
|
||||||
- name: Rename tnc binaries
|
- name: Rename tnc binaries
|
||||||
|
# we don't need renaming for pyinstaller builds as output name is defined
|
||||||
|
if: ${{!startsWith(matrix.os, 'macos')}}
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
mv dist/tnc/daemon* dist/tnc/${{ matrix.daemon_binary_name }}
|
mv dist/tnc/daemon* dist/tnc/${{ matrix.daemon_binary_name }}
|
||||||
|
@ -336,6 +333,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: tnc/dist/tnc
|
path: tnc/dist/tnc
|
||||||
|
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|
||||||
|
@ -347,48 +345,12 @@ jobs:
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|
||||||
#- name: Compress TNC
|
- name: cleanup on macos before code signing
|
||||||
# # if: ${{!startsWith(matrix.os, 'windows') }}
|
if: ${{startsWith(matrix.os, 'macos')}}
|
||||||
# shell: bash
|
run: |
|
||||||
# run: |
|
ls -l
|
||||||
# cd ./tnc/dist
|
# find . -type d -name .git -exec rm -r {} \;
|
||||||
# zip -r ./${{ matrix.zip_name }}.zip *
|
find . -type d -o -name ".git" -delete
|
||||||
|
|
||||||
##- name: Copy TNC to GUI
|
|
||||||
## run: |
|
|
||||||
## # cp -R ./tnc/dist/tnc ./gui/tnc
|
|
||||||
## cp -R ./tnc/dist ./gui/tnc
|
|
||||||
|
|
||||||
##- name: LIST ALL FILES
|
|
||||||
## run: ls -R
|
|
||||||
|
|
||||||
##- name: Compress TNC
|
|
||||||
## uses: thedoctor0/zip-release@master
|
|
||||||
## with:
|
|
||||||
## type: 'zip'
|
|
||||||
## filename: '${{ matrix.zip_name }}'
|
|
||||||
## # directory: ./tnc/dist/tnc
|
|
||||||
## directory: ./tnc/dist/tnc
|
|
||||||
## 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: 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
|
||||||
|
|
1
.github/workflows/ctest.yml
vendored
1
.github/workflows/ctest.yml
vendored
|
@ -21,6 +21,7 @@ jobs:
|
||||||
- python-version: "3.9"
|
- python-version: "3.9"
|
||||||
- python-version: "3.10"
|
- python-version: "3.10"
|
||||||
- python-version: "3.11"
|
- python-version: "3.11"
|
||||||
|
- python-version: "3.12-dev"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
23
add-osx-cert.sh
Normal file
23
add-osx-cert.sh
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
KEY_CHAIN=build.keychain
|
||||||
|
CERTIFICATE_P12=certificate.p12
|
||||||
|
|
||||||
|
# Recreate the certificate from the secure environment variable
|
||||||
|
echo $CERTIFICATE_OSX_APPLICATION | base64 --decode > $CERTIFICATE_P12
|
||||||
|
|
||||||
|
#create a keychain
|
||||||
|
security create-keychain -p actions $KEY_CHAIN
|
||||||
|
|
||||||
|
# Make the keychain the default so identities are found
|
||||||
|
security default-keychain -s $KEY_CHAIN
|
||||||
|
|
||||||
|
# Unlock the keychain
|
||||||
|
security unlock-keychain -p actions $KEY_CHAIN
|
||||||
|
|
||||||
|
security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $CERTIFICATE_PASSWORD -T /usr/bin/codesign;
|
||||||
|
|
||||||
|
security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN
|
||||||
|
|
||||||
|
# remove certs
|
||||||
|
rm -fr *.p12
|
16
gui/entitlements.plist
Normal file
16
gui/entitlements.plist
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.automation.apple-events</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -28,6 +28,9 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://freedata.app",
|
"homepage": "https://freedata.app",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@electron/asar": "^3.2.3",
|
||||||
|
"@electron/osx-sign": "^1.0.4",
|
||||||
|
"@popperjs/core": "^2.11.6",
|
||||||
"blob-util": "^2.0.2",
|
"blob-util": "^2.0.2",
|
||||||
"bootstrap": "^5.2.1",
|
"bootstrap": "^5.2.1",
|
||||||
"bootstrap-icons": "^1.9.1",
|
"bootstrap-icons": "^1.9.1",
|
||||||
|
@ -98,7 +101,8 @@
|
||||||
"from": "../tnc/dist/tnc/",
|
"from": "../tnc/dist/tnc/",
|
||||||
"to": "tnc",
|
"to": "tnc",
|
||||||
"filter": [
|
"filter": [
|
||||||
"**/*"
|
"**/*",
|
||||||
|
"!**/.git"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -25,6 +25,7 @@ daemon_exe = EXE(daemon_pyz,
|
||||||
[],
|
[],
|
||||||
exclude_binaries=True,
|
exclude_binaries=True,
|
||||||
name='freedata-daemon',
|
name='freedata-daemon',
|
||||||
|
bundle_identifier='com.dj2ls.freedata-daemon',
|
||||||
debug=False,
|
debug=False,
|
||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
|
@ -62,6 +63,7 @@ tnc_exe = EXE(tnc_pyz,
|
||||||
[],
|
[],
|
||||||
exclude_binaries=True,
|
exclude_binaries=True,
|
||||||
name='freedata-tnc',
|
name='freedata-tnc',
|
||||||
|
bundle_identifier='com.dj2ls.freedata-tnc',
|
||||||
debug=False,
|
debug=False,
|
||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
|
|
Loading…
Reference in a new issue