-
Notifications
You must be signed in to change notification settings - Fork 5
feat: misc fixes and improvements to CLI builds, packges and installation methods #263
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
Conversation
- Updated the installation script to include Amazon Linux (amzn) in the supported distributions for both installation checks and tool installations. - Adjusted the required tools check to ensure `sha256sum` is installed via `coreutils` if not already available, enhancing compatibility across distributions.
Deploying phase-cli-install-script with
|
| Latest commit: |
ba71f38
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b533999b.phase-cli-install-script.pages.dev |
| Branch Preview URL: | https://feat--cli-install-improvemen.phase-cli-install-script.pages.dev |
- Added conditional installation steps for `pyinstaller` and the build process to skip on Linux. - Introduced a new job to build the Linux binary in a Debian bullseye container, ensuring compatibility with older glibc versions. - Updated the workflow to improve the overall build process for macOS and Linux environments.
- Added new jobs to test installation on various Linux distributions for both x86_64 and ARM64 architectures. - Implemented a matrix strategy to run tests across multiple versions of Ubuntu, Debian, Fedora, CentOS, Rocky Linux, Amazon Linux, and Alpine. - Updated the build process for ARM64 to utilize Docker for building with PyInstaller, improving consistency and reliability across platforms.
- Introduced new jobs for testing installation on various Linux distributions for both x86_64 and ARM64 architectures. - Implemented a matrix strategy to run tests across multiple versions of Ubuntu, Debian, Fedora, CentOS, Rocky Linux, Amazon Linux, and Alpine. - Enhanced the testing process by downloading necessary artifacts and verifying installations in Docker containers.
- Changed double quotes to single quotes in the build commands for both x86_64 and ARM64 architectures in the CI workflow. - Improved readability and consistency in the shell command syntax across different platforms.
- Modified the installation command for PyInstaller to use static libraries and avoid binary installations, enhancing compatibility and reliability in the build process. - Ensured consistent environment variable usage for PyInstaller across different jobs in the CI workflow.
- Updated the build scripts for both x86_64 and ARM64 architectures to improve Python installation process. - Added error handling and conditional logic to determine the correct Python version to install. - Streamlined the installation commands for dependencies and PyInstaller, ensuring a more robust and consistent build environment.
- Enhanced the build scripts for both x86_64 and ARM64 architectures by adding OpenSSL 1.1.1 installation steps. - Updated dependency installation commands to include Perl and streamline the build environment. - Improved library path settings to ensure proper linking during Python installation.
- Updated the verification logic for the `phase` command in the CI workflow to provide clearer output on its availability in the PATH. - Enhanced error handling by displaying the current PATH and listing directories if the command is not found, improving troubleshooting capabilities.
- Updated the output messages for the `phase` command verification in the CI workflow to remove unnecessary details, enhancing clarity. - Maintained existing error handling and troubleshooting capabilities by preserving the PATH display and directory listings when the command is not found.
- Removed Ubuntu 18.04 and Debian Buster from the build matrix in the CI workflow to streamline the testing process. - Retained support for newer versions of Ubuntu and Debian, ensuring the workflow remains up-to-date and relevant.
- Improved the output for the `phase` command verification in the CI workflow by adding additional checks and clearer messages. - Ensured that the command is executed without arguments and included a check for the users keyring, enhancing the troubleshooting process.
- Replaced `--copy-metadata` with `--collect-all` for `prompt_toolkit` and `questionary` in the CI workflow to ensure all necessary files are included in the build. - Added environment variable exports to ensure a minimal locale/terminal environment for `prompt_toolkit` and `questionary` during the build process.
- Added support for new Debian (trixie) and Fedora (41, 42) images in the build matrix. - Included additional CentOS versions (8, 9, 10) to enhance compatibility. - Updated Alpine version to include 3.21 and 3.22, while removing outdated versions (3.18, 3.19). - Expanded the arm64 build matrix to include more OS images for comprehensive testing.
- Updated the base image in the Dockerfile to use Python 3.12-alpine3.19. - Modified various CI workflow files to set the Python version to 3.12, ensuring compatibility with the latest features and security updates.
- Introduced a new runtime hook (`freeze_hook_prompt_toolkit.py`) to ensure the `prompt_toolkit` module has a `__version__` attribute when metadata is unavailable in frozen bundles. - Updated CI workflow to utilize the new hook during the PyInstaller build process, enhancing compatibility and stability.
- Added separate build steps for macOS and Windows in the CI workflow, utilizing the prompt_toolkit hook for each platform. - Updated the PyInstaller commands to ensure compatibility and proper inclusion of necessary files for both operating systems.
- Modified the build process to stage files in a specific directory structure to preserve the PyInstaller onedir layout. - Updated package building commands for both Debian and RPM to use the new staged root, ensuring proper file inclusion.
- Replaced deprecated CentOS versions (8, 9, 10) with CentOS Stream images (stream8, stream9, stream10) in the CI workflow for improved compatibility and support.
- Eliminated the CentOS 7 image from the CI workflow to streamline the build process and focus on supported CentOS Stream versions.
- Updated the RPM installation commands to prefer local RPMs without contacting repositories, reducing potential DNS failures. - Added fallback mechanisms for different package managers (dnf, microdnf, yum) to ensure successful installation of RPM packages. - Removed the archlinux image from the build matrix for a cleaner configuration.
- Simplified the RPM installation process by prioritizing `dnf` and `microdnf` commands, ensuring successful package installations. - Removed deprecated CentOS Stream images from the CI workflow to streamline the build matrix and focus on supported distributions. - Updated the build matrix to include only relevant images for improved compatibility and maintenance.
- Modified the CI workflow to download and build Python from source with shared library support, enhancing compatibility with other applications. - Streamlined the installation of build dependencies and updated the commands for both x86_64 and aarch64 architectures to use the newly built Python. - Ensured SSL support is verified post-installation, improving the robustness of the build process.
…x images - Removed CentOS 7 and Amazon Linux 2 images from the build configuration to streamline the CI workflow. - Updated the configuration to focus on more recent versions of CentOS and Amazon Linux, ensuring compatibility with current standards.
- Eliminated CentOS stream images (8, 9, and 10) from the build configuration to streamline the CI workflow and focus on more current distributions.
- Updated the CI workflow to install PyInstaller version 6.16.0 explicitly, ensuring consistency across builds. - Removed deprecated test installation jobs for various Linux distributions to streamline the workflow.
- Specified PyInstaller version 6.16.0 in the build workflow to ensure consistency. - Introduced new workflows for testing CLI installation across various Linux distributions, including x86_64 and ARM64 architectures. - Removed deprecated test installation jobs to streamline the CI process and improve maintainability.
- Renamed and restructured installation test jobs for x86_64 and ARM64 architectures to improve clarity and organization. - Expanded the matrix of Linux distributions tested, including multiple versions of Ubuntu, Debian, Fedora, Rocky Linux, Amazon Linux, and Alpine. - Updated the installation steps to run tests in Docker containers, ensuring a consistent testing environment across different distributions.
…elease - Modified the CI workflow to use new YAML files for testing CLI installation after the build and release processes, enhancing clarity and organization. - Updated job dependencies to ensure proper execution order in the CI pipeline.
- Updated package version from 1.21.0 to 1.21.1 in APKBUILD and const.py. - Added new configuration script (config.sh) with environment variables for SSL verification, debugging, host, and service token.
…allation steps - Added comments in the build workflow to clarify design decisions for Linux builds, including the use of manylinux_2_28 and shared libpython for PyInstaller. - Included echo statements to document the installation of Python from source and the creation of symlinks for better package management.
- Updated comment in the build workflow to accurately reflect that manylinux_2_28 targets glibc 2.28 baseline, ensuring clarity in design decisions for Linux builds.
…artifacts - Implemented a new step in the CI workflow to download the Linux x86_64 binary artifact. - Updated installation logic to utilize the downloaded binary for Alpine versions below 3.20 and for other distributions, enhancing the installation process and error handling. - Improved echo statements for better clarity during the installation process.
…rtifacts - Introduced a new step in the CI workflow to download the Linux ARM64 binary artifact. - Updated installation logic to utilize the downloaded binary, improving the installation process for ARM64 architecture. - Enhanced error handling and echo statements for better clarity during the installation process.
- Added a comment in the build workflow to explain the creation of a symlink for the phase binary in the /usr/lib/phase/ directory, enhancing clarity for future maintainers.
…lity - Updated the CI workflow to include the installation of findutils for Alpine and other distributions, enhancing compatibility during the installation of x86_64 binary artifacts. - Added a check to install findutils if not already present, ensuring smoother execution of the workflow.
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances CLI builds, packaging, and installation methods with several improvements. Key changes include adding support for Amazon Linux and Rocky Linux distributions, upgrading Python version to 3.12, and switching to ManyLinux builds for better compatibility.
- Added Amazon Linux 2023 and Rocky Linux support in installation script
- Upgraded Python version from 3.11 to 3.12 across all workflows and Docker configurations
- Switched to ManyLinux builds with PyInstaller 6.16.0 for Linux CLI builds
- Improved RPM packaging to fix prompt_toolkit/questionary runtime exceptions
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| phase_cli/utils/const.py | Bumped version to 1.21.1 |
| install.sh | Added Amazon & Rocky Linux support, improved sha256sum handling |
| config.sh | Added new configuration file with development settings |
| Dockerfile | Updated base image to Python 3.12 |
| APKBUILD | Updated package version to 1.21.1 |
| .github/workflows/test-install-post-build.yml | New comprehensive test workflow for post-build installation testing |
| .github/workflows/test-cli-install.yml | Removed old installation test workflow |
| .github/workflows/test-cli-install-post-release.yml | New test workflow for post-release installation validation |
| .github/workflows/pypi.yml | Updated to Python 3.12 |
| .github/workflows/process-assets.yml | Updated to Python 3.12 |
| .github/workflows/main.yml | Updated to Python 3.12 and added new test workflows |
| .github/workflows/build.yml | Major refactor to use ManyLinux builds with PyInstaller 6.16.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
- Deleted the config.sh file, which contained environment variables for SSL verification, debugging, host, and service token, as it is no longer needed.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Renamed 'test-install' to 'test-install-post-build' and 'test-cli-install' to 'test-cli-install-post-release' for better context. - Added 'continue-on-error: true' to both jobs to allow the workflow to proceed even if these steps fail, improving robustness.
- Removed 'continue-on-error: true' from the test-install-post-build job to ensure failures are reported. - Added 'continue-on-error: true' to the test_install_x86_64 and test_install_arm64 jobs for better resilience in the CI process.
install.shldd --version)Note
Moves Linux PyInstaller builds to manylinux_2_28 (x86_64/aarch64) with pinned PyInstaller, adds broad distro install tests, extends installer OS support, and bumps Python/CLI versions.
/usr/lib/phasewith/usr/bin/phasesymlink; add ARM64 build via manylinux aarch64; upload artifacts.3.12; add post-build and post-release install test matrices across Debian/Ubuntu/Fedora/Rocky/AMZN/Alpine/Arch; adjust test job references; keep release asset processing.install.sh: Addamznandrockysupport; extend RPM install paths; improve required tool installs (usecoreutilsforsha256sum).APKBUILD: bump to1.21.1.phase_cli/utils/const.py: bump__version__to1.21.1.Dockerfile: base image topython:3.12-alpine3.19.config.shwith env defaults.Written by Cursor Bugbot for commit cf5c13c. This will update automatically on new commits. Configure here.