The current way adds a lot of ordering assumptions, and doesn't fit too
well with parallel batch fuzzing either. Add a "upload-build" boolean action
input that can be added to "build_fuzzers" to upload latest builds
instead.
Builds are now uploaded by commit hash, rather than a fixed "latest" name.
ClusterFuzzLite's download_latest_build will check the last 3 commits and download the
first available build by git hash.
Repos cloned with `--branch BRANCH` will only track that branch, even
when we unshallow. If we provide a git SHA from another branch, it will
not be recognized.
To fix, this, we update the remote tracking config and fetch them.
For google/osv#88.
* [CIFuzz] Fix diffing + Refactor
Make diffing work in two scenarios where it previously failed:
1. Commit fuzzing. In this case, we diff $COMMIT against
$COMMIT^1 because the intent here is to fuzz the commit.
2. Fuzzing PRs that aren't to master. In this case, we previously
were diffing against origin/master. Instead, diff against the local
version of the base repo. This also has the nice effect of handling
PRs that havent pulled from master recently enough.
Also do refactoring.
1. Move code that is different for differenct CI systems to continuous_integration.py
2. Change how configuration in build_fuzzers is handled.
Previously configuration was gotten in build_fuzzers_entrypoint
and passed as individual params. This made code ugly and hard to
read. Instead, move code dealing with config to it's own module
config_utils. This module implements a config class which can
be used to create objects that are passed around to code that needs
it. Making the code much easier to read.
TODO: Move run_fuzzers code to new config system.
When the build fails against HEAD OSS-Fuzz, we find the date of the
commit for the project, and use the latest revision of OSS-Fuzz before
it to rebuild the project builder container.
Subsequent runs will use the last built container, and if that fails
that will again find the closest revision of OSS-Fuzz.
Also factor BaseRepoManager out of RepoManager to provide a generic repo
manager class for dealing with existing checkouts (which don't need a
clone).
This adds the functionality of git diff --name-only to the repo manager module. This functionality will be used for the affected fuzzer feature of CIFuzz. Associated tests have also been added.
* Max comments
* Added bisection tests
* Added test cases
* Docker run command added to build_specific commit
* Infer main repo uses docker image rather than docker file
* Added mores tests for repo infer
* With verbosity
* Formatting
* Bisection fixed
* Formatting updates
* Oliver small comments.
* Script infer main repo
* Detect repo and test module finished
* Detect main repo from script
* Regex searching
* Regex searching
* Max comments + bisector test script
* Oliver comments
* Max's comments
* String concat update
* Jonathan comments