diff options
author | Oliver Chang <oliverchang@users.noreply.github.com> | 2021-08-17 16:36:06 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 06:36:06 +0000 |
commit | a4bc23909b873b60630123e3e42b7a7d1d5ee939 (patch) | |
tree | 57ed1681a4d9505977b4c625e28f72caab4f8d57 /infra/cifuzz/build_fuzzers.py | |
parent | 44addc5c71526c3ea0eed2b545d9271c35d62359 (diff) | |
download | oss-fuzz-a4bc23909b873b60630123e3e42b7a7d1d5ee939.tar.gz |
Don't upload builds in run_fuzzers. (#6151)
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.
Diffstat (limited to 'infra/cifuzz/build_fuzzers.py')
-rw-r--r-- | infra/cifuzz/build_fuzzers.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/infra/cifuzz/build_fuzzers.py b/infra/cifuzz/build_fuzzers.py index 978b50fb6..94478fdc2 100644 --- a/infra/cifuzz/build_fuzzers.py +++ b/infra/cifuzz/build_fuzzers.py @@ -111,6 +111,14 @@ class Builder: # pylint: disable=too-many-instance-attributes self.handle_msan_postbuild(docker_container) return True + def upload_build(self): + """Upload build.""" + if self.config.upload_build: + self.clusterfuzz_deployment.upload_build( + self.repo_manager.get_current_commit()) + + return True + def handle_msan_postbuild(self, container): """Post-build step for MSAN builds. Patches the build to use MSAN libraries.""" @@ -133,7 +141,7 @@ class Builder: # pylint: disable=too-many-instance-attributes and then removes the unaffectted fuzzers. Returns True on success.""" methods = [ self.build_image_and_checkout_src, self.build_fuzzers, - self.remove_unaffected_fuzz_targets + self.upload_build, self.remove_unaffected_fuzz_targets ] for method in methods: if not method(): |