GitHub - hylo-lang/hylo-dev-toolchain: A docker image containing everything needed for building the Hylo compiler. (original) (raw)

Hylo Compiler Development Environment

A containerized development environment for the Hylo compiler with automated CI/CD pipeline.

By default, this image contains:

Quick Start

Using Docker Images

Specific version (recommended, for build reproducability)

FROM ghcr.io/hylo-lang/hylo-dev-toolchain:v0.1.5 FROM ghcr.io/hylo-lang/hylo-dev-toolchain:v0.1.5-MinSizeRel FROM ghcr.io/hylo-lang/hylo-dev-toolchain:v0.1.5-Debug

Latest release

FROM ghcr.io/hylo-lang/hylo-dev-toolchain:latest FROM ghcr.io/hylo-lang/hylo-dev-toolchain:latest-MinSizeRel FROM ghcr.io/hylo-lang/hylo-dev-toolchain:latest-Debug

The Debug/MinSizeRel refers to the LLVM build version contained within the image.

Optional Arguments

CI/CD Pipeline

Overview

The repository uses an automated CI/CD system that:

Pull Request Workflow

  1. Open a PR → Automatically builds a Docker image tagged as pr-<number>-<sha>.
  2. Test the PR image using the instructions in the automatic PR comment added after a successful CI build
  3. Merge or close PR → Image is automatically cleaned up

Release Workflow

  1. Push to main → Updates draft release and builds draft image
  2. Publish release → Builds final release image and updates latest tag
  3. Old images cleanup → Runs weekly to remove experimental images >7 days old

Contributing

Commit Messages and PR Labels

Your commit messages should be clear and descriptive. However, the PR labels are what control versioning and release notes that can be added by maintainers.

Version Bumping Labels

Categorization Labels

Special Labels

Development Process

  1. Create a feature branch from main
  2. Make your changes with clear commit messages
  3. Open a pull request with appropriate labels
  4. Test the PR image using the Docker command from the auto-comment
  5. Address review feedback if needed
  6. Merge when approved → Draft release is automatically updated

Testing Images

PR Images

Every PR gets a unique Docker image for testing:

Example: PR #123 with commit abc1234

docker pull ghcr.io/hylo-lang/hylo-dev-toolchain:pr-123-abc1234 docker run --rm -it ghcr.io/hylo-lang/hylo-dev-toolchain:pr-123-abc1234

Draft Release Images

Test upcoming releases before they're published:

docker pull ghcr.io/hylo-lang/hylo-dev-toolchain:latest-draft docker run --rm -it ghcr.io/hylo-lang/hylo-dev-toolchain:latest-draft

Release Management

Automatic Release Process

  1. Merge PRs with appropriate labels → Draft release is updated
  2. Review the draft at Releases page
  3. Test the draft image if needed
  4. Publish the release → Final Docker image is built and tagged

Manual Release Process

  1. Go to Releases page
  2. Click "Draft a new release"
  3. Choose tag (e.g., v1.2.0) and fill release notes
  4. Publish → Docker image is automatically built

Available Docker Tags

Image Cleanup Policy

Automatic Labeling

Some labels are automatically applied based on changed files: