Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Josh/pyinstaller ci #197

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/binary_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Binary Tests

on: pull_request

jobs:
compile:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: snok/install-poetry@v1
with:
version: "1.7.1"
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: ~/my-custom-path
installer-parallel: true
- name: Install dependencies
run: poetry install --no-root
- name: Permission prebuilt bins for darwin ARM64
run: |
chmod +x bins/darwin/arm64/aea_bin
chmod +x bins/darwin/arm64/tendermint
- name: Create Pearl ARM64
run: pyinstaller pearl_arm64.spec
- name: Permission the pearl_arm64 binary
run: chmod +x dist/pearl_arm64
- name: Test Pearl ARM64 runs
run: ./dist/pearl_arm64

3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ jobs:
NODE_ENV: production
DEV_RPC: https://rpc-gate.autonolas.tech/gnosis-rpc/
IS_STAGING: ${{ github.ref != 'refs/heads/main' && 'true' || 'false' }}
FORK_URL: https://rpc-gate.autonolas.tech/gnosis-rpc/
- run: rm -rf /dist
FORK_URL: https://rpc-gate.autonolas.tech/gnosis-rpc/
- name: "Build, notarize, publish"
env:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }}
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ cache
leak_report

*.dist
*.build
/electron/bins/
*.build
Binary file added bins/darwin/arm64/aea_bin
Binary file not shown.
Binary file added bins/darwin/arm64/tendermint
Binary file not shown.
57 changes: 57 additions & 0 deletions pearl_arm64.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_data_files
from PyInstaller.utils.hooks import collect_all

datas = []
binaries = [('bins/darwin/arm64/aea_bin', '.'), ('bins/darwin/arm64/tendermint', '.')]
hiddenimports = ['aea_ledger_ethereum', 'aea_ledger_cosmos', 'aea_ledger_ethereum_flashbots']
datas += collect_data_files('eth_account')
tmp_ret = collect_all('aea')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('autonomy')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('operate')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('aea_ledger_ethereum')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('aea_ledger_cosmos')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('aea_ledger_ethereum_flashbots')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]


a = Analysis(
['operate/pearl.py'],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='pearl_arm64',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
424 changes: 300 additions & 124 deletions poetry.lock

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ include = [
[tool.poetry.scripts]
operate = "operate.cli:main"

# >=3.8,<3.13
# <4.0,>=3.9

[tool.poetry.dependencies]
python = "<3.13,>=3.8"
python = "3.10.x"
open-autonomy = "==0.14.11.post1"
open-aea-ledger-ethereum = "==1.51.0"
open-aea-ledger-ethereum-flashbots = "==1.51.0"
open-aea-ledger-cosmos = "==1.51.0"
open-aea-cli-ipfs = "==1.51.0"
clea = "==0.1.0rc4"
cytoolz = "==0.12.3"
Expand Down
Loading