Skip to main content

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​

ArtifactRepositoryDescription
gccArtifact-gccGCC compiler toolchain
gcc-arm-none-eabiArtifact-gcc-arm-none-eabiGCC ARM bare-metal toolchain
ninjaArtifact-ninjaNinja build system
doxygenArtifact-ninjaDoxygen 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:

FunctionSignatureDescription
<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:

  1. Repository name: Artifact-<name> (e.g. Artifact-cmake)
  2. Core branch: contains ArtifactConfig.cmake with <name>_GetArtifactVersion and <name>_ArtifactInit implemented
  3. Bin branch: contains versioned ZIP archives tagged as Bin/<version>-<platform>
  4. Add as submodule to this repository:
git submodule add -b Core https://github.com/Embedbits/Artifact-<name>.git <name>


🧩 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.