Qonfused / OCE-Build

A minimal framework for fast, secure, and reliable build and dependency management for OpenCore EFIs.
https://ocebuild.readthedocs.io
BSD 3-Clause "New" or "Revised" License
14 stars 0 forks source link

Distribute PyInstaller installers or compiled binaries #5

Open Qonfused opened 12 months ago

Qonfused commented 12 months ago

Follow-up to https://github.com/acidanthera/bugtracker/issues/2311#issuecomment-1636697162

Executable (C/C++ compiled binary)

Qonfused commented 11 months ago

Added a pyinstaller build step in https://github.com/Qonfused/OCE-Build/commit/7db43417afaa0785988d37ab1da2ebda70c0a9d0. Runs on a post-install hook only available when developing locally (so available in CI but not when users are building the sdist). For library distribution, the CLI will still point to the cli/__main__.py library entrypoint.

Qonfused commented 11 months ago

What is remaining are enabling flags for passing in the target architecture (i.e. --target-arch), and/or additional args for building for different architectures.

The default behavior on macOS (given the XCode environment supports it) is to build universal2 binaries: https://pyinstaller.org/en/stable/bootloader-building.html?highlight=universal2#building-for-macos

Additional references:

Qonfused commented 7 months ago

Nightly workflow is setup as of 2912ff78e2ba038faef6e820025403b46efa436e.

This maps ocebuild binaries under:

Unfortunately, 32-bit and ARM runners on GitHub aren't available (at least without creating a nested virtual machine with QEMU, or similar). For the nightly workflow at least, this can be setup using a self-hosted runner, though this poses an issue for broader workflows.

Qonfused commented 1 month ago

Can revisit distributing arm binaries. GitHub added Arm64 Linux and Windows runners to actions a few days ago: https://github.blog/2024-06-03-arm64-on-github-actions-powering-faster-more-efficient-build-systems/