Artifacts Overview
This repository serves as a central artifact hub for build tools, documentation generators, and other external dependencies used across multiple embedded projects.
Each artifact (e.g., GCC, Doxygen, Cppcheck) is managed as a dedicated Git submodule, which enables version tracking and modular updates while keeping the main repositories lightweight.
🧱 Purpose
The goal of this repository is to:
- Maintain a single access point for shared build dependencies
- Enable versioned artifact management across projects
- Support automated retrieval and unpacking through CMake or Azure pipelines
- Reduce dependency on external downloads during CI/CD builds
Available Artifacts
| Artifact | Repository | Description |
|---|---|---|
gcc | Artifact-gcc | GCC compiler toolchain |
gcc-arm-none-eabi | Artifact-gcc-arm-none-eabi | GCC ARM bare-metal toolchain |
ninja | Artifact-ninja | Ninja build system |
doxygen | Artifact-ninja | Doxygen documentation generator tool |
Repository Structure
Each subdirectory represents an individual artifact repository.
Artifacts/
├─ gcc/ # GCC toolchain (as submodule)
├─ doxygen/ # Doxygen generator (as submodule)
├─ cppcheck/ # Static analysis tool (as submodule)
└─ ...
Artifact Structure
Each artifact repository follows a consistent three-branch convention:
Artifact-<name>/
├── main # Default branch, documentation and general information
├── Core # CMake integration layer (ArtifactConfig.cmake)
└── Bin # Binary releases as ZIP archives
Core Branch
Contains ArtifactConfig.cmake — the CMake integration file for the artifact. It exposes two mandatory functions that must be implemented for every artifact:
| Function | Signature | Description |
|---|---|---|
<name>_GetArtifactVersion | (<name>_GetArtifactVersion RET_VERSION) | Returns the installed version of the artifact in X.Y.Z format |
<name>_ArtifactInit | (<name>_ArtifactInit) | Initializes the artifact for use in the build (sets PATH, CMake variables, etc.) |
Note: The function prefix must exactly match the artifact folder name (submodule directory name). The build process relies on this naming convention to locate and invoke the correct functions.
Commits on Core are versioned — each commit corresponds to a specific version of the CMake integration layer.
Bin Branch
Contains versioned binary releases of the artifact. Each commit holds a ZIP archive with the prebuilt binaries for the supported platforms, along with a SHA-256 checksum file.
Releases are tagged using the format:
Bin/<version>-<platform>
For example: Bin/1.12.1-linux, Bin/1.12.1-windows
Usage
Clone with Submodules
To reduce repository size when fetching artifacts:
git clone --no-checkout --depth=1 https://github.com/YourOrg/Artifacts.git
Individual submodules can be fetched on-demand only when needed:
git -C Artifacts submodule update --init --depth=1 gcc
CMake Integration
Each artifact submodule directory contains the ArtifactConfig.cmake file (sourced from the Core branch). Include it in your CMake project:
include(<path_to_artifacts>/<artifact_name>/ArtifactConfig.cmake)
# Initialize the artifact (sets PATH and other environment variables)
<artifact_name>_ArtifactInit()
# Optionally query the installed version
<artifact_name>_GetArtifactVersion(ARTIFACT_VERSION)
message(STATUS "<artifact_name> version: ${ARTIFACT_VERSION}")
Example with Ninja:
include(${ARTIFACTS_DIR}/ninja/ArtifactConfig.cmake)
ninja_ArtifactInit()
ninja_GetArtifactVersion(NINJA_VERSION)
message(STATUS "Ninja version: ${NINJA_VERSION}")
Adding a New Artifact
A new artifact repository must follow this structure:
- Repository name:
Artifact-<name>(e.g.Artifact-cmake) Corebranch: containsArtifactConfig.cmakewith<name>_GetArtifactVersionand<name>_ArtifactInitimplementedBinbranch: contains versioned ZIP archives tagged asBin/<version>-<platform>- Add as submodule to this repository:
git submodule add -b Core https://github.com/Embedbits/Artifact-<name>.git <name>
Related Repositories
- Artifact-ninja — Ninja build system artifact
- Artifact-gcc-arm-none-eabi — GCC ARM toolchain artifact
🧩 Integration with CI/CD
This repository is designed for automated use in CI environments such as Azure DevOps or GitHub Actions.
Example Azure pipeline usage:
- script: |
cmake -DARTIFACT_NAME=gcc -DARTIFACT_VERSION=1.0.3 -P ./CMakeModules/ArtifactsHandler.cmake
displayName: 'Fetch GCC artifact'
🧠 Notes
- Each artifact submodule can be versioned and updated independently
- Hash files (
.hash) are recommended to ensure artifact integrity - Avoid committing large binaries directly; use compressed archives only
- The main repository (
Artifacts) never contains tool sources directly — only references
🏷 License
All artifact submodules retain their own licenses.
This parent repository only coordinates their inclusion and version tracking.