This setup installs HHVM and enables execution of Hack language code in a controlled environment.
Compatibility Notice
HHVM currently supports only specific Ubuntu LTS versions. Ensure your environment uses one of the following:
- Ubuntu 22.04 (Jammy)
- Ubuntu 20.04 (Focal)
The ubuntu-latest runner (currently 24.04) is not supported and will lead to installation or runtime issues.
For consistency and reliability—especially in CI/CD pipelines—use a Docker container based on Ubuntu 20.04. This guarantees compatibility with HHVM and avoids dependency conflicts introduced in newer distributions.
It is recommended to create a Docker image using Ubuntu 20.04 as the base for running HHVM/Hack.
- Avoid using ubuntu-latest in GitHub Actions for HHVM workflows.
- Prefer explicit OS versioning (ubuntu-22.04 or ubuntu-20.04).
- Use Docker when portability and reproducibility are required.
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup HHVM/Hacklang
uses: CodeWithSushil/setup-hhvm@v2.2
with:
hack-version: latest
- name: Run Hack code
run: hhvm index.php