Skip to content

Add RoadRunner building #65

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

Merged
merged 38 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2a61514
feat: add Velox configuration into Software Registry
roxblnfk Jul 8, 2025
9b50867
feat: add Velox build action and plugin configuration
roxblnfk Jul 8, 2025
6f7a944
feat: add Velox API draft
roxblnfk Jul 8, 2025
323c7f4
feat: separate Task Manager into `Task` module
roxblnfk Jul 8, 2025
240219d
feat(Container): enhance binding method to support class name aliases
roxblnfk Jul 8, 2025
c8f4d86
feat(Binary): implement GlobalBinary for system binaries and rename B…
roxblnfk Jul 9, 2025
aca1c77
feat(FileSystem): add FS utility class for file system operations
roxblnfk Jul 10, 2025
c1c0e17
feat(DependencyChecker): add dependency checker for Velox build requi…
roxblnfk Jul 10, 2025
1ab1274
feat(Binary): refactor binary classes to use `AbstractBinary` and add…
roxblnfk Jul 10, 2025
48deb50
feat(BinaryExecutor, DependencyChecker): add logging for command exec…
roxblnfk Jul 10, 2025
fabceec
refactor(Binary): update execute methods to return output as arrays a…
roxblnfk Jul 10, 2025
a19abc4
refactor(DependencyChecker): enhance binary version checks with impro…
roxblnfk Jul 10, 2025
b253fce
refactor(LocalBinary): store absolute path for binary in constructor
roxblnfk Jul 11, 2025
a5bd4cf
refactor(FS, Path): update parameter types for mkdir and add file/dir…
roxblnfk Jul 11, 2025
1742f58
feat(VeloxBuilder): implement basic builder with local config support…
roxblnfk Jul 11, 2025
84ecbdf
feat(Build): add custom build command for Velox with enhanced logging…
roxblnfk Jul 11, 2025
39371e7
feat(Manager): enhance task management with promise support and defer…
roxblnfk Jul 11, 2025
dd85938
feat(DLoad): enhance download task with promise support and introduce…
roxblnfk Jul 11, 2025
ab02fe6
feat(DependencyChecker): implement Velox binary download logic with v…
roxblnfk Jul 11, 2025
83f44f3
feat(VeloxBuilder): modify error handling to return rejected promise …
roxblnfk Jul 11, 2025
7f3609d
feat(DLoad): add binary-path attribute to specify RoadRunner binary l…
roxblnfk Jul 11, 2025
edae512
chore: cleanup; fix psalm issues
roxblnfk Jul 11, 2025
2491138
style(php-cs-fixer): fix coding standards
Jul 11, 2025
f81b110
docs(readme): update README files with new sections for building cust…
roxblnfk Jul 11, 2025
f916739
docs(readme): improve Spanish and Russian README translations for cla…
roxblnfk Jul 12, 2025
5a5a4b1
fix(DLoad): initialize variables before use in binary extraction loop
roxblnfk Jul 27, 2025
59b5c6b
feat(velox): implement configuration strategies for local, remote, an…
roxblnfk Jul 27, 2025
c5110b1
refactor(velox): implement pipeline-based configuration processing wi…
roxblnfk Jul 27, 2025
bc12c03
test(velox): add unit tests for `ConfigPipeline` processing and conte…
roxblnfk Jul 27, 2025
f2989cc
refactor(velox): reorder parameters in ConfigContext constructor and …
roxblnfk Jul 27, 2025
e8b66e1
test(velox): add unit tests for LocalFileProcessor handling TOML conf…
roxblnfk Jul 27, 2025
7c71d43
feat(velox): enhance TOML serialization with support for nested secti…
roxblnfk Jul 27, 2025
55f6034
feat(velox): implement BuildRoadRunner API client and update configur…
roxblnfk Jul 27, 2025
b4ca4ad
feat(velox): normalize RoadRunner ref and order TOML sections
roxblnfk Jul 27, 2025
5b00d1d
feat(velox): replace binary-version with roadrunner-ref in configurat…
roxblnfk Jul 27, 2025
760dcc9
docs(velox): update action attribute descriptions in README files for…
roxblnfk Jul 27, 2025
5a0494f
feat(velox): add debug flag to configuration examples and update vers…
roxblnfk Jul 28, 2025
5011ec7
chore(velox): update psalm baseline and enhance configuration classes…
roxblnfk Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
296 changes: 226 additions & 70 deletions README-es.md

Large diffs are not rendered by default.

325 changes: 241 additions & 84 deletions README-ru.md

Large diffs are not rendered by default.

310 changes: 233 additions & 77 deletions README-zh.md

Large diffs are not rendered by default.

157 changes: 157 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,43 @@ With DLoad, you can:
- Manage cross-platform compatibility without manual configuration
- Keep binaries and assets separate from your version control

### Table of Contents

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Command Line Usage](#command-line-usage)
- [Initialize Configuration](#initialize-configuration)
- [Download Software](#download-software)
- [View Software](#view-software)
- [Build Custom Software](#build-custom-software)
- [Configuration Guide](#configuration-guide)
- [Interactive Configuration](#interactive-configuration)
- [Manual Configuration](#manual-configuration)
- [Download Types](#download-types)
- [Version Constraints](#version-constraints)
- [Advanced Configuration Options](#advanced-configuration-options)
- [Building Custom RoadRunner](#building-custom-roadrunner)
- [Build Action Configuration](#build-action-configuration)
- [Velox Action Attributes](#velox-action-attributes)
- [Build Process](#build-process)
- [Configuration File Generation](#configuration-file-generation)
- [Using Downloaded Velox](#using-downloaded-velox)
- [DLoad Configuration](#dload-configuration)
- [Building RoadRunner](#building-roadrunner)
- [Custom Software Registry](#custom-software-registry)
- [Defining Software](#defining-software)
- [Software Elements](#software-elements)
- [Use Cases](#use-cases)
- [Development Environment Setup](#development-environment-setup)
- [New Project Setup](#new-project-setup)
- [CI/CD Integration](#cicd-integration)
- [Cross-Platform Teams](#cross-platform-teams)
- [PHAR Tools Management](#phar-tools-management)
- [Frontend Asset Distribution](#frontend-asset-distribution)
- [GitHub API Rate Limits](#github-api-rate-limits)
- [Contributing](#contributing)


## Installation

```bash
Expand Down Expand Up @@ -147,6 +184,25 @@ Alternatively, you can download the latest release from [GitHub releases](https:
./vendor/bin/dload show --all
```

### Build Custom Software

```bash
# Build custom software using configuration file
./vendor/bin/dload build

# Build with specific configuration file
./vendor/bin/dload build --config=./custom-dload.xml
```

#### Build Options

| Option | Description | Default |
|--------|-------------|---------|
| `--config` | Path to configuration file | ./dload.xml |

The `build` command executes build actions defined in your configuration file, such as creating custom RoadRunner binaries with specific plugins.
For detailed information about building custom RoadRunner, see the [Building Custom RoadRunner](#building-custom-roadrunner) section.

## Configuration Guide

### Interactive Configuration
Expand Down Expand Up @@ -267,6 +323,107 @@ Use Composer-style version constraints:
</dload>
```

## Building Custom RoadRunner

DLoad supports building custom RoadRunner binaries using the Velox build tool. This is useful when you need RoadRunner with custom plugin combinations that aren't available in pre-built releases.

### Build Action Configuration

```xml
<actions>
<!-- Basic configuration using local velox.toml -->
<velox config-file="./velox.toml" />

<!-- With specific versions -->
<velox config-file="./velox.toml"
velox-version="2025.1.1"
golang-version="^1.22"
roadrunner-ref="v2025.1.2"
binary-path="./bin/rr"
debug="true" />

<!-- Custom plugins -->
<velox>
<plugin name="temporal" />
<plugin name="kv" />
</velox>
</actions>
```

### Velox Action Attributes

| Attribute | Description |
|-----------|-------------|
| `velox-version` | Version constraint for the Velox build tool to use |
| `golang-version` | Go version constraint required for building RoadRunner |
| `roadrunner-ref` | RoadRunner Git reference (tag, commit, or branch) to use as the base for building |
| `config-file` | Path to base configuration file that may be merged with remote API responses or other sources |
| `binary-path` | Output path for the built RoadRunner binary. File extension is automatically added based on OS (`.exe` for Windows). Defaults to current working directory |
| `debug` | Build RoadRunner with debug symbols to profile it with pprof (boolean, defaults to `false`) |

### Build Process

DLoad automatically handles the build process:

1. **Golang Check**: Verifies Go is installed globally (required dependency)
2. **Velox Preparation**: Uses Velox from global installation, local download, or downloads automatically if needed
3. **Configuration**: Copies your local velox.toml to build directory
4. **Building**: Executes `vx build` command with specified configuration
5. **Installation**: Moves built binary to target location and sets executable permissions
6. **Cleanup**: Removes temporary build files

> [!NOTE]
> DLoad requires Go (Golang) to be installed globally on your system. It does not download or manage Go installations.

### Configuration File Generation

You can generate a `velox.toml` configuration file using the online builder at https://build.roadrunner.dev/

For detailed documentation on Velox configuration options and examples, visit https://docs.roadrunner.dev/docs/customization/build

This web interface helps you select plugins and generates the appropriate configuration for your custom RoadRunner build.

### Using Downloaded Velox

You can download Velox as part of your build process instead of relying on a globally installed version:

```xml
<actions>
<download software="velox" extract-path="bin" version="2025.1.1" />
<velox config-file="velox.toml"
golang-version="^1.22"
roadrunner-ref="2024.1.5" />
</actions>
```

This ensures consistent Velox versions across different environments and team members.

### DLoad Configuration

```xml
<?xml version="1.0"?>
<dload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/php-internal/dload/refs/heads/1.x/dload.xsd">
<actions>
<velox config-file="./velox.toml"
velox-version="^1.4.0"
golang-version="^1.22"
roadrunner-ref="2024.1.5"
binary-path="./bin/rr" />
</actions>
</dload>
```

### Building RoadRunner

```bash
# Build RoadRunner using velox.toml configuration
./vendor/bin/dload build

# Build with specific configuration file
./vendor/bin/dload build --config=custom-rr.xml
```

## Custom Software Registry

### Defining Software
Expand Down
1 change: 1 addition & 0 deletions bin/dload
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ use Symfony\Component\Console\CommandLoader\FactoryCommandLoader;
Command\ListSoftware::getDefaultName() => static fn() => new Command\ListSoftware(),
Command\Show::getDefaultName() => static fn() => new Command\Show(),
Command\Init::getDefaultName() => static fn() => new Command\Init(),
Command\Build::getDefaultName() => static fn() => new Command\Build(),
]),
);
$application->setDefaultCommand(Command\Get::getDefaultName(), false);
Expand Down
Loading
Loading