Install CI Fuzz
Installation
You can get the latest release from GitHub or by running our install script:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/CodeIntelligenceTesting/cifuzz/main/install.sh)"
If you are using Windows you can download the latest release and execute it.
Add the installation's bin
directory to your PATH
.
Linux/MacOS
When running the installer as a non-root user, files are installed to:
~/.local/share/cifuzz
(default) or$XDG_DATA_HOME/cifuzz
if$XDG_DATA_HOME
is set.
A symlink to the cifuzz
executable is created in ~/.local/bin/cifuzz
.
When running the installer as root, files are installed to
/opt/code-intelligence/cifuzz
and a symlink to the cifuzz
executable
if created in /usr/local/bin/cifuzz
.
Windows
All files are installed to %APPDATA%/cifuzz
with the executable located
in %APPDATA%/cifuzz/bin
.
How to uninstall cifuzz
Linux / macOS
If you installed cifuzz as root:
sudo rm -rf /opt/code-intelligence/cifuzz /usr/local/bin/cifuzz /usr/local/share/cifuzz
If you installed cifuzz as a non-root user:
rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/cifuzz" ~/.local/bin/cifuzz ~/.cmake/packages/cifuzz
If you installed into a custom installation directory you have to remove that one instead.
Windows
To uninstall cifuzz and delete the corresponding registry entries:
rd /s %APPDATA%/cifuzz
reg delete "HKLM\Software\Kitware\CMake\Packages\cifuzz" /f 2> nul
reg delete "HKCU\Software\Kitware\CMake\Packages\cifuzz" /f 2> nul
Prerequisites
Depending on your language / build system of choice CI Fuzz has different prerequisites:
C/C++ with CMake
Ubuntu / Debian
sudo apt install cmake clang llvm lcov
Arch
sudo pacman -S cmake clang llvm lcov
macOS
brew install cmake llvm lcov
Windows
At least Visual Studio 2022 version 17 is required.
Please make sure to
- select "Develop Desktop C++ applications" in the Visual Studio Installer
- check "C++ Clang Compiler for Windows" in the "Individual Components" tab
- check "C++ CMake Tools for Windows" in the "Individual Components" tab
You can add these components anytime by choosing "Modify" in the Visual Studio Installer.
choco install lcov
You may have to add %ChocolateyInstall%\lib\lcov\tools\bin
to your PATH variable.
C/C++ with Bazel
- Bazel >= 5.3.2 (>=6.0.0 on macOS)
- Java JDK >= 8 (1.8) (e.g. OpenJDK or Zulu) is needed for Bazel's coverage feature.
- LLVM >= 11
- lcov
Ubuntu / Debian
sudo apt install clang llvm lcov default-jdk zip
# install bazelisk
sudo curl -L https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 -o /usr/local/bin/bazel
sudo chmod +x /usr/local/bin/bazel
Arch
sudo pacman -S clang llvm lcov python jdk-openjdk zip
# install bazelisk
sudo curl -L https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 -o /usr/local/bin/bazel
sudo chmod +x /usr/local/bin/bazel
macOS Bazel C/C++ projects are currently not supported on macOS.
Windows Bazel C/C++ projects are currently not supported on Windows.
Java with Maven
Ubuntu / Debian
sudo apt install default-jdk maven
Arch
sudo pacman -S jdk-openjdk maven
macOS
brew install openjdk maven
Windows
choco install microsoft-openjdk maven
Java with Gradle
Ubuntu / Debian
sudo apt install default-jdk gradle
Arch
sudo pacman -S jdk-openjdk gradle
macOS
brew install openjdk gradle
Windows
choco install microsoft-openjdk gradle
Android
Currently CI Fuzz does not support fuzz tests running in an emulator or on a device, it is still possible to run local tests. You can find more information and an example at the cifuzz-gradle-plugin repository.
- Gradle >= 7.5
- Android Gradle Plugin >= 7.4.2
Windows
In order to get font colors and glyphs to render properly install the
Windows Terminal from the Microsoft Store.
Run cifuzz
in Developer PowerShell for VS 2022
inside of Windows Terminal
.
Limitations
Windows
- C/C++ projects are only supported with CMake and fuzz tests cannot depend on shared libraries.
- Continuous code coverage is not supported for C/C++ projects.