From b04a8265ffb9f377aa2e2319884b24a923b7ed71 Mon Sep 17 00:00:00 2001 From: Ardian <30511811+0xArdi@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:26:24 +0200 Subject: [PATCH] fix: intel build --- .github/workflows/release.yaml | 19 ++++++++++++++----- tox.ini | 2 ++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 31c2accdb..6f42bf7e7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -154,10 +154,10 @@ jobs: $CMD service deploy --name '${{ vars.SERVICE_NAME }}' --service-dir $SERVICE_PATH --service-ipfs-hash $IPFS_HASH --ingress-enabled true --keys '${{ vars.SERVICE_KEYS }}' --timeout 320 build-macos-pyinstaller: - runs-on: macos-latest + runs-on: ${{ matrix.os }} strategy: matrix: - arch: [ x64, arm64 ] + os: [ macos-14, macos-14-large ] steps: - uses: actions/checkout@v3 @@ -177,14 +177,23 @@ jobs: - name: Install dependencies run: poetry install + - name: Set arch environment variable for macos-latest-large + if: contains(matrix.os, 'large') + run: echo "OS_ARCH=x64" >> $GITHUB_ENV + + - name: Set arch environment variable for other macOS versions + if: ${{ !contains(matrix.os, 'large') }} + run: echo "OS_ARCH=arm64" >> $GITHUB_ENV + - name: Build with PyInstaller run: | - poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots --hidden-import grpc --hidden-import openapi_core --collect-all google.protobuf --collect-all openapi_core --collect-all openapi_spec_validator --collect-all asn1crypto --hidden-import py_ecc --hidden-import pytz --onefile pyinstaller/trader_bin.py --name trader_bin_${{ matrix.arch }} + poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots --hidden-import grpc --hidden-import openapi_core --collect-all google.protobuf --collect-all openapi_core --collect-all openapi_spec_validator --collect-all asn1crypto --hidden-import py_ecc --hidden-import pytz --onefile pyinstaller/trader_bin.py --name trader_bin_${{env.OS_ARCH}} - name: Upload Release Assets uses: actions/upload-artifact@v2 with: - name: trader_bin_${{ matrix.arch }} - path: dist/trader_bin_${{ matrix.arch }} + name: trader_bin_${{env.OS_ARCH}} + path: dist/trader_bin_${{env.OS_ARCH}} + upload-assets: needs: build-macos-pyinstaller runs-on: ubuntu-latest diff --git a/tox.ini b/tox.ini index aee8a24ee..9671ff90a 100644 --- a/tox.ini +++ b/tox.ini @@ -636,3 +636,5 @@ pathable: ==0.4.3 ; false positive pyinstaller: ==6.8.0 pyinstaller-hooks-contrib: >=2024.6 +; sub-dep of aiohttp, has PSF-2.0 License https://github.com/aio-libs/aiohappyeyeballs/blob/main/LICENSE +aiohappyeyeballs: >=2.3.4,<3.0.0 \ No newline at end of file