Commit Graph

82 Commits

Author SHA1 Message Date
Oliver Chang 273882068e
Tag all base images with :v1. (#6436)
To guard against major/breaking image migrations in the future.

Part of #6324.
2021-09-16 11:12:25 +10:00
Catena cyber dd8e46c38b
Swift ideal integration (#6312)
* Helper flags for swift compilation

* Documentation for swift project integration

* Adds swift to the languages with coverage

* Only thread sanitizer is supported

* Fixes swift coverage target compilation

* fixup flags facotring

* swift: run on new ubuntu

* fixup

* swift: right copy for symbolizer
2021-09-02 14:56:01 -07:00
Jonathan Metzman 316f788f62 Fix i386 build uploading.
Don't upload to x86_64 bucket.

Fixes: https://github.com/google/oss-fuzz/issues/6382
2021-09-02 08:45:09 -07:00
jonathanmetzman 5ef1f7b588
[language builders] Get rid of base-builder-new (#6361)
Build all C/C++ projects in an image without rust, java,
atheris (python), or go.
2021-09-01 13:36:17 -07:00
jonathanmetzman b15c167739
[infra][rust] Split out rust projects to their own builder image (#6352) 2021-08-30 11:47:04 -07:00
jonathanmetzman 50f2fde161
[infra][python] Split out python projects to their own builder. (#6341) 2021-08-30 07:00:26 -07:00
jonathanmetzman a4cd74a98e
[go][infra] Create base-builder-go and use it to build go projects. (#6335)
Also, update base-builder-new to copy everything base-builder does
2021-08-30 06:57:23 -07:00
jonathanmetzman 8520693633
[infra][jvm] Split out JVM projects to their own builder. (#6336) 2021-08-30 06:51:24 -07:00
Oliver Chang 8e36398e81
Fix exception in request_coverage_build. (#6328) 2021-08-27 07:21:50 -07:00
Oliver Chang 8c28dd7e0e
Fix exception in build. (#6323)
Have build_project.Project() take in project.yaml contents and parse
that.
2021-08-26 21:28:30 +00:00
jonathanmetzman 6fc72b3a17
[Ubuntu upgrade][infra] Remove deploy for msan-build (#6314)
Related: #6180
2021-08-26 08:38:52 -07:00
jonathanmetzman 370fb73473
[build][infra] Improve build functions. (#6296)
Important functional changes involve mostly improvements to
the command line scripts (this doesn't affect the build infra, only
local use):

1. Make sure scripts use the same builder as builds requested by infra, otherwise builds
will be very slow and will fail for larger projects.
2. Allow users to specify --test-images to use base images with suffix "-testing"
3. Allow script users to specify --parallel for parallel builds.
4. Allow script users to specify --testing so that builds are uploaded to testing buckets.
5. Allow script users to specify --branch so that builds use specified branch instead of master.
6. Clone oss-fuzz with depth 1 for improved speed and space usage.
7. Use logging instead of writing to stderr or print.
8. Allow scripts to accept multiple projects.
9. Allow script to keep executing after failure to get build steps.
10. Change scripts to use python3.
11. Tag more so builds are easier to query.
12. Log the gcb page for each build.

Other changes include major refactoring:

1. Don't construct image names from scratch using format strings each time they are used.
Provide a helper function for this.
2. Provide a helper function,  get_env instead of constructing the env from scratch each time.
3. Move compile step into its own function: get_compile_step.
4. Move upload steps into their own helper function get_upload_steps.
5. Don't misuse the name image_project when we really mean cloud project.
6. Move cleanup step into its own helper function: get_cleanup_step.
7. Exit with returncode of main function from build_project.
8. Add unittests for build_project.
9. Make request_build share run_build code with build_project.
10. Use proper spacing in comments.
11. Test builds other than libfuzzer-ASAN-x86_64. Test other sanitizers, fuzzers and architectures
12. Make build_and_run_coverage share more code with build_project.
13. Move tests for build_and_run_coverage_test.py out of requst_coverage_test.py into their own file.
14. Use single quotes for strings.
15. Store state for a build in Build object instead of passing it everywhere.
16. Don't abuse project_yaml dict for storing project state. Use a Project object instead.
17. Better variable naming.
18. Use more classes instead of passing around arguments.
19. Use more f-strings.
20. Make scripts share main function.
21. Begin comments with uppercase and end with period.
22. Don't import functions or classes as dictated by style guide.
23. Share more test code in test_utils

Related: #6180.
2021-08-25 11:44:52 -07:00
jonathanmetzman 3a4e6e4484
[Ubuntu upgrade] Remove support for prebuilt MSAN libraries. (#6280)
This is done in anticipation of the upgrade to Ubuntu 20.04 which wont support this.
We'll do this first so we can handle any breakages caused by this step before needing to handle breakages
caused by the upgrade. However, there shouldn't be any breakages due to #6281, but there may be some projects
we overlooked.
The only exception to this is libcxx.
Related: #6180.
2021-08-25 15:36:05 +00:00
jonathanmetzman a3f8ac1403
Fix coverage command and misc fixes (#6262) 2021-08-23 10:18:11 +10:00
asraa 30d927e324
New base builder without lang specific installation + swift base (#5986)
Removes unnecessary stuff in base-builder image to create a base-builder-new, and then adds a base-builder-swift on top of this that swift projects can use (without JVM/Go/etc fuzzing).
2021-08-20 09:52:44 +10:00
jonathanmetzman 01247be731
[infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" (#6198)
Also rename mock_ functions to have impl suffix so we can use mock_ in place of mocked_
2021-08-12 11:25:57 -07:00
jonathanmetzman e407f54e61
[infra][build] Switch to f-strings. (#6182) 2021-08-10 10:48:16 -07:00
jonathanmetzman 67e3a77fd7
[NFC][infra][build] Move test data to test_data directory. (#6081)
Do this for consistency.
2021-07-21 10:07:59 -07:00
jonathanmetzman 6c5fffc019
[infra][build] Reset HOME using env instead of bash. (#6079)
Followup on #6069.
2021-07-21 09:09:08 -07:00
jonathanmetzman d66e974cbe
[infra][build] Set HOME=/root on GCB when doing fuzzer builds. (#6069)
[infra][build] Set HOME=/root on GCB when doing fuzzer builds.
GCB passes HOME as env var to the docker container. It sets
HOME to /builder/home which is persisted accross builds.
This issue causes build breakages in
https://github.com/google/oss-fuzz/issues/6035
and possibly https://github.com/google/oss-fuzz/issues/5317.
Perhaps more insidiuosly it can cause fuzzers to be built with
the wrong instrumentation.
2021-07-20 06:56:50 -07:00
Oliver Chang 3022776970
Revert "Bring back build status page fix until quota issues are resolved. (#5997)" (#6008)
This reverts commit e10f1658fa.
2021-07-08 10:32:36 +10:00
Abhishek Arya e10f1658fa
Bring back build status page fix until quota issues are resolved. (#5997) 2021-07-05 10:15:45 -07:00
jonathanmetzman 535597b038
[build/infra] Build engines in alphabetical order. (#5987)
* [build/infra] Build engines in alphabetical order.

Previously, a project fuzz targets were usually built in the order:
libfuzzer, afl, honggfuzz. This can bias results if one is looking
at which engine finds bugs first.

* fix tests

* lnt
2021-07-01 11:17:18 -07:00
DavidKorczynski d6970e868f
infra: Remove unused import from update_build_status (#5981)
In this commit 0370821e39 the use of the `time` import was removed. This causes the CI to complain about `infra/build/functions/update_build_status.py:21:0: W0611: Unused import time (unused-import)` here https://github.com/google/oss-fuzz/pull/5980/checks?check_run_id=2941631092
2021-06-29 12:29:35 +00:00
Abhishek Arya 0370821e39
Revert rate limits in update_build_status. 2021-06-28 21:30:04 -07:00
Abhishek Arya 53eff02879
Update update_build_status.py 2021-06-25 17:43:38 -07:00
Abhishek Arya a5822bb2ff
Update update_build_status.py 2021-06-25 17:09:42 -07:00
Abhishek Arya 00bbfdb5e1
Update update_build_status.py 2021-06-25 16:56:01 -07:00
Abhishek Arya 7d93e152de
Update update_build_status.py 2021-06-25 13:19:33 -07:00
Abhishek Arya ea06882e92
Update update_build_status.py 2021-06-25 13:16:47 -07:00
Abhishek Arya 77211e836c
Update update_build_status.py 2021-06-25 12:46:09 -07:00
Abhishek Arya 3096b90ca2
Update update_build_status.py 2021-06-25 12:04:37 -07:00
Abhishek Arya ba0a288c6e
Update update_build_status.py 2021-06-25 11:40:44 -07:00
Abhishek Arya 7e61f5509e
Update update_build_status.py 2021-06-25 11:06:47 -07:00
Abhishek Arya 3680920a30
Update update_build_status.py 2021-06-25 10:38:19 -07:00
Abhishek Arya 5fcb499c68
Decrease number of build logs to avoid rate limits. (#5973) 2021-06-25 10:18:38 -07:00
Abhishek Arya 867646da2d
Update update_build_status.py 2021-06-25 09:43:11 -07:00
Abhishek Arya 3b19d9fc18
Update update_build_status.py 2021-06-25 09:29:33 -07:00
Abhishek Arya f367531263
Reduce memory requirement in cloud functions to 2gb 2021-06-25 09:24:34 -07:00
Abhishek Arya db33cc2c38
Update update_build_status.py 2021-06-25 09:04:31 -07:00
Abhishek Arya 13a076b275
Reduce build status workers to see if quota issue resolve. 2021-06-25 08:42:43 -07:00
Abhishek Arya dbe6bd6fd3
Try fix for memory exceeded (#5969)
* Try fix for memory exceeded

Should fix https://github.com/google/oss-fuzz/issues/5968

* Update deploy.sh
2021-06-25 08:02:31 -07:00
Fabian Meumertzheim fee51cc181
[infra] Run JVM coverage builds (#5770) 2021-05-14 17:07:48 -07:00
dependabot[bot] 54f0985f8e
Bump pyyaml from 5.2 to 5.4 in /infra/build/functions (#5512)
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.2 to 5.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/5.2...5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-25 20:44:10 -07:00
Fabian Meumertzheim 6ca344a446
Generate badges for projects without coverage (#5459)
Generate badges also for projects with no coverage builds at all (e.g.
JVM and Python projects). For these projects, the badge only has the two
possible states "build passing" and "build failing".
2021-03-21 18:52:02 -07:00
Catena cyber c41e46ffc8
Rust coverage report (for Suricata) (#4697)
* Rust coverage test

* Workaround to get rust coverage for Suricata
2021-03-08 07:05:35 -08:00
jonathanmetzman 0ac841a1a4
Replace terms that are uninclusive. (#5045) 2021-01-25 08:41:34 -08:00
Oliver Chang 8fcb4659e3
Add a missing requirement for CI. (#5036) 2021-01-22 12:45:11 +11:00
jonathanmetzman 648242fdb4
[pylint] Enable no-member check (#5034) 2021-01-21 16:21:17 -08:00
Oliver Chang 5b51cfb00f
Fix build functions tests when invoked from unittest.TestSuite. (#5027) 2021-01-21 07:43:42 -08:00