diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 71ed01c..f110ff8 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -64,12 +64,15 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.11.4 + # We initially use `arch -x86_64` to ensure that we use an x86_64 version + # of Python, regardless of the host architecture. + # Subsequent invocations will all use the x86_64 `python3` binary within the venv. - name: Build run: > cd scripts && - ./build.sh && + arch -x86_64 /bin/bash ./build.sh && cd ../client/dist && - bash ../../scripts/tests/macos_test.sh && + arch -x86_64 /bin/bash ../../scripts/tests/macos_test.sh && rm output.log && ln -s /Applications "Applications (admin)" && hdiutil create -fs HFS+ -srcfolder . -volname NSO-RPC mac-installer.dmg && diff --git a/scripts/build.sh b/scripts/build.sh index 1da5d20..2c5ee1a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,7 +1,15 @@ #!/bin/bash +set -e + +# Run everything relative to our script directory. +cd "$(dirname "$0")" + +# Activate a virtual environment so we don't pollute the system environment. python3 -m venv --upgrade-deps venv source venv/bin/activate cd ../client + +# As this is an x86_64 only version, ensure `py2app` outputs x86_64. python3 -m pip install -r requirements.txt pyqt6 py2app GitPython python3 _version.py rm setup.py