Skip to content

Commit

Permalink
Add more information on pre-built ccached images to README. (#12994)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverchang authored Jan 31, 2025
1 parent ef3b5c8 commit 9efdcf3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions infra/experimental/chronos/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Chronos: rebuilding OSS-Fuzz harnesses using cached builds

## Pre-built images.

Daily pre-built images are available at:

- `us-central1-docker.pkg.dev/oss-fuzz/oss-fuzz-gen/<PROJECT>-ofg-cached-address`
- `us-central1-docker.pkg.dev/oss-fuzz/oss-fuzz-gen/<PROJECT>-ofg-cached-coverage`

They can be used as drop-in replacements for the usual `gcr.io/oss-fuzz/<PROJECT>` images.

These images are generated in 2 ways:
- (Preferred) [Generate](https://github.com/google/oss-fuzz/blob/master/infra/base-images/base-builder/bash_parser.py)
a replay build script that can be re-run alongside existing build artifacts,
leveraging existing build system mechanisms to avoid rebuilding (e.g. running
`make` twice should not actually rebuild everything). This is error-prone, so
we validate the script works by running it.
- (Fallback, if the replay build script didn't work). We leverage
[ccache](https://ccache.dev/), to provide a compiler cache. This is often not
as fast as the replay build script, because some project builds spend
significant time doing non-compiler tasks (e.g. checking out submodules,
running configure scripts).

Note: this mechanism does not work for every single OSS-Fuzz project today. The
resulting image may either:
- Not provide much performance improvement compared with a normal image, or
- Not exist at all (if neither approach worked).

TODO: Aggregate stats on expected performance improvements.

## Usage locally

**Example 1: htslib**
Expand Down

0 comments on commit 9efdcf3

Please sign in to comment.