Draft: Opensource Hexagon toolchain and CI/CD
Eigen MR: Hexagon DSP CI/CD and Open Source Toolchain Integration
Reference issue
This MR is part of the breakdown of !1695: !1695
What does this implement/fix?
This Merge Request is the first in a series breaking down !1695, focusing on integrating the open source Hexagon toolchain and enabling CI/CD for Hexagon DSP cross-compilation and testing.
Summary of Changes
-
CI Modernization
- Adds a new
ci/Dockerfileto build a CI image with the open source Hexagon toolchain (20.1.4) and all dependencies pre-installed. - Updates
.gitlab-ci.ymlto use new Hexagon-specific build and test pipelines (build.hexagon.gitlab-ci.yml,test.hexagon.gitlab-ci.yml), disabling legacy Linux/Windows jobs for this MR. - CI jobs now use pre-built Docker images for consistent, reproducible environments.
- Adds a new
-
CMake Toolchain
- Introduces
cmake/HexagonToolchain.cmakefor robust Hexagon cross-compilation, with auto-detection of toolchain paths, sysroot, and architecture. - Ensures all compiler, linker, and sysroot settings are sourced from the open source toolchain.
- Introduces
-
Validation and Documentation
- Adds
ci/test-hexagon-setup.shfor automated validation of the Hexagon toolchain and QEMU emulator in CI and locally. - Provides
ci/docs/hexagon-ci-guide.mdwith detailed instructions for local and CI usage, troubleshooting, and migration from legacy scripts.
- Adds
-
Test and Build Matrix
- Defines a comprehensive CI matrix for Hexagon v68/v73, HVX, debug, optimized, and minimal builds, with QEMU-based test execution and artifact collection.
- Enables parallel and performance testing, with clear job separation and artifact retention.
-
Minor Source Fix
- Updates
test/main.hto include<hexagon_types.h>when building with HVX to avoid macro conflicts.
- Updates
Additional information
This MR establishes a robust, open, and maintainable foundation for Hexagon DSP support in Eigen, using only open source toolchains and infrastructure. It enables reliable cross-compilation and QEMU-based testing in both CI and local environments, paving the way for further Hexagon vectorization and optimization work.
No core Eigen code is changed in this MR; all changes are CI, toolchain, and infrastructure related.