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:
- Swift 6.2.0
- LLVM 20.1.6 MinSizeRel with assertions enabled (see Hylo build to look at which components are installed). You can
- pkg-config
- LLVM's
bin/folder onPATH - LLVM's pkg-config file on
PKG_CONFIG_PATH- package identifier:llvm
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
HYLO_LLVM_BUILD_TYPE: Can beDebug/MinSizeRel(latter is the default).HYLO_LLVM_BUILD_RELEASE: Release tag from llvm-buildHYLO_LLVM_VERSION: LLVM version, which must match the version contained within the build specified by the release tag, such as20.1.6.
CI/CD Pipeline
Overview
The repository uses an automated CI/CD system that:
- Builds Docker images for every pull request, with a temporary published package (
pr-...) - Creates draft releases automatically after merging
- Cleans up experimental images automatically
Pull Request Workflow
- Open a PR → Automatically builds a Docker image tagged as
pr-<number>-<sha>. - Test the PR image using the instructions in the automatic PR comment added after a successful CI build
- Merge or close PR → Image is automatically cleaned up
Release Workflow
- Push to main → Updates draft release and builds draft image
- Publish release → Builds final release image and updates
latesttag - 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
majororbreaking→ Major version bump (1.0.0 → 2.0.0)minor,feature, orenhancement→ Minor version bump (1.0.0 → 1.1.0)patch,fix,bugfix, orbug→ Patch version bump (1.0.0 → 1.0.1)choreormaintenance→ Patch version bump
Categorization Labels
feature/enhancement→ 🚀 Featuresfix/bugfix/bug→ 🐛 Bug Fixeschore/maintenance→ 🧰 Maintenancedocumentation/docs→ 📚 Documentationci/cd/build→ 🏗️ CI/CDdependencies/deps→ ⬆️ Dependencies
Special Labels
skip-changelog→ Excludes from release notesduplicate/invalid/wontfix→ Excludes from release notes
Development Process
- Create a feature branch from
main - Make your changes with clear commit messages
- Open a pull request with appropriate labels
- Test the PR image using the Docker command from the auto-comment
- Address review feedback if needed
- 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
- Merge PRs with appropriate labels → Draft release is updated
- Review the draft at Releases page
- Test the draft image if needed
- Publish the release → Final Docker image is built and tagged
Manual Release Process
- Go to Releases page
- Click "Draft a new release"
- Choose tag (e.g.,
v1.2.0) and fill release notes - Publish → Docker image is automatically built
Available Docker Tags
latest→ Latest stable releasev1.0.0→ Specific version tagslatest-draft→ Current draft release (for testing)pr-123-abc1234→ PR-specific images (temporary)
Image Cleanup Policy
- PR images: Deleted when PR is closed/merged
- Draft images: Replaced when new draft is created
- Old experimental images: Cleaned up weekly (>7 days old)
- Release images: Never automatically deleted
Automatic Labeling
Some labels are automatically applied based on changed files:
documentation→.mdfiles,docs/folderci→.github/workflows/filesdependencies→package.json,requirements.txt, etc.build→Dockerfile*,make-pkgconfig.sh