Skip to content

Commit

Permalink
Enforce x86_64 for build environment
Browse files Browse the repository at this point in the history
This ensures that x86_64 is leveraged for our pure x86_64 builds even on arm64 runners.
  • Loading branch information
spotlightishere committed May 16, 2024
1 parent a83dc11 commit edf6938
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ jobs:
python-version: 3.11.4
- name: Build
run: >
# 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.
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 &&
Expand Down
8 changes: 8 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit edf6938

Please sign in to comment.