Welcome to ochami — part of the OpenCHAMI community project under the Linux Foundation Projects (LFP), High Performance Software Foundation (HPSF).
For general contribution guidelines, code of conduct, DCO requirements, and community standards, please see:
OpenCHAMI Contributing Guidelines
This document provides ochami-specific guidance for building, testing, and submitting contributions.
- Go (see minimum version in go.mod)
make(for local builds)goreleaser(for official builds)scdoc(for man page generation)- Container runtime: Docker, Podman, or compatible (optional, for container builds)
The fastest way to build during development:
makeThis uses the Makefile with linker flags to embed build metadata. The binary will be created in the current directory.
Run tests:
make testRun linting:
make lintCheck REUSE compliance:
make check-reuseThis is the recommended approach for testing container changes before submitting a PR.
Build a local container from source using a multi-stage build:
make containerTo use a different container runtime (e.g. Podman):
make CONTAINER_PROG=$(which podman) containerBuild local containers for all supported architectures using the Makefile goreleaser target:
# Build for your current platform
make GORELEASER_OPTS='--clean --snapshot' goreleaser-releaseNote
Goreleaser as of writing does not have the capability of building only a
single container for the current architecture. To do this using Goreleaser,
modification of .goreleaser.yaml is necessary (just be sure to revert
changes after).
If this is not desired, use the multi-stage build method above.
To use a different container runtime (e.g. Podman):
make CONTAINER_PROG=$(which podman) GORELEASER_OPTS='--clean --snapshot' goreleaser-releaseThe Makefile supports these environment variables for goreleaser builds:
IS_PR_BUILD- Whether this is a PR build (default:false)GORELEASER_OPTS- Additional flags to pass to goreleaser
The container will be available as ghcr.io/openchami/ochami:latest locally.
You can test it:
# Using Docker
docker run ghcr.io/openchami/ochami:latest ochami --version
# Using Podman
podman run ghcr.io/openchami/ochami:latest ochami --versionWhen you submit a PR from a fork, GitHub Actions will automatically build binaries, packages, and containers. Container images are built but not published for fork PRs due to GitHub security restrictions.
The best workflow is to build and test locally first before submitting a PR:
- Make your changes
- Build locally using the Makefile approach above
- Test the container locally to validate your changes
- Submit your PR - binaries/packages/containers will build automatically (containers are built locally but not published to registries for forks)
This ensures your changes work before CI runs.
Container images are built locally but not published for fork PRs due to GitHub security restrictions.
GitHub Actions workflows from fork PRs can build containers locally within the workflow but cannot push them to any registry. This is a security feature and cannot be bypassed.
Your fork PR will still:
- Build binaries for all platforms
- Build packages (deb, rpm, apk, archlinux)
- Build container images locally (for validation)
- Run all tests and linting
- Be fully reviewable and mergeable
To test containers before submitting, build and test locally using the Makefile.
For reviewers:
Check out the fork branch locally to test containers:
# Fetch PR branch
PR_NUMBER=<pr_number>
git fetch origin "pull/${PR_NUMBER}/head:pr-${PR_NUMBER}"
git checkout "pr-${PR_NUMBER}"
# Build and test
make GORELEASER_OPTS='--clean --snapshot' goreleaser-release
docker run ghcr.io/openchami/ochami:latest ochami --versionNote: PRs from upstream branches (not forks) will build containers normally
at ghcr.io/openchami/ochami:pr-<pr_number>.
- Fork the repository and create a feature branch
- Build and test locally using
makeormake goreleaser-build - Run all checks before submitting:
make test make lint make check-reuse - Commit with DCO sign-off (see OpenCHAMI Contributing Guidelines)
- Open a Pull Request and ensure it passes CI checks
- Respond to review feedback promptly
- OpenCHAMI Contributing
Guidelines
- Code of conduct, DCO, REUSE compliance, quality standards
- OpenCHAMI Community - Values, principles, charter, governance
- ochami Documentation - Manual pages in scdoc format
- OpenCHAMI Slack - Community chat
- ochami Issues - Bug reports and feature requests
Thank you for contributing to ochami and the OpenCHAMI community!