mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 13:01:04 +01:00
5714f4deb2eaf52d4b2026a02027eb41bf581759
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6db13532ca |
Try using clangd-tidy (#5763)
Run clangd-tidy in parallel with clang-tidy, to experimentally see whether it works reasonably well. These may produce slightly different results, and it's not clear that clangd-tidy will be better, so being cautious about switching. A real possibility here is this is slower in some cases (building compile commands takes ~6m below), but faster in the extremely slow cases (when clang-tidy takes >10m). For contrast: - clang-tidy: https://github.com/carbon-language/carbon-lang/actions/runs/16038096026/job/45254162180?pr=5763 - clangd-tidy: https://github.com/carbon-language/carbon-lang/actions/runs/16038096427/job/45254164217?pr=5763 |
||
|
|
f5e69734d9 |
Bump clang version to 19 (#5440)
The version of clangd/clang-tidy on developer machines has slowly diverged from the one on the CI builders, which is causing a slowly increasing amount of pain as clang-tidy CI runs fail (incorrectly) over things that a newer clangd/clang-tidy was perfectly fine with locally. This bumps the Clang version used in the ubuntu builders to 19, which is the most recent in Debian stable. We use https://apt.llvm.org instead of LLVM's GitHub releases (https://github.com/llvm/llvm-project/releases) as the former more reliably has packages for newer Clang/LLVM versions on x64. The community-build releases binaries on LLVM's GitHub have stopped including Ubuntu packages that match the GitHub x64 Ubuntu workers for some time (for at least the 18 and 19 releases). By moving to apt.llvm.org packages we only download and install the headers and libraries needed for development, rather than every output of building llvm, which is much faster and saves lots of disk space. We also remove the system installations of other versions of clang/llvm so we should end up using negative disk space. We can no longer easily cache the installation but apt.llvm.org is a reliable end point. We bump the ubuntu image version for the github workers to 24.04, as apt.llvm.org has stopped building images for 22.10 in 2022 at its end of life. The `pre_commit` workflow disabled sudo unlike the other workflows that install Clang/LLVM, including the `clang-tidy` workflow (which is also run on `pull_request`). We bring it into alignment with the other workflows so that we can install the llvm packages. And we lock its ubuntu image to 24.04 so that it can be moved in lockstep with the other workflows that depend on Clang/LLVM. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com> |
||
|
|
bd99b74608 |
Adds a bazel query to retry syncing deps (#5386)
Trying to improve resilience against failures such as: ``` INFO: Repository rules_jvm_external+ instantiated at: <builtin>: in <toplevel> Repository rule http_archive defined at: /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_tools/tools/build_defs/repo/http.bzl:392:31: in <toplevel> ERROR: /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_tools/tools/build_defs/repo/http.bzl:137:45: An error occurred during the fetch of repository 'rules_jvm_external+': Traceback (most recent call last): File "/home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_tools/tools/build_defs/repo/http.bzl", line 137, column 45, in _http_archive_impl download_info = ctx.download_and_extract( ``` https://github.com/carbon-language/carbon-lang/actions/runs/14719625211/job/41311145495?pr=5379 It looks like GitHub currently has a high rate of these, which it shouldn't, but also maybe we can do a little more to weather these service issues. To show flag behavior: ``` ╚╡./scripts/run_bazel.py --attempts=5 --retry-all-errors :foo Command ':foo' not found. Try 'bazel help'. Retrying exit code 2 because it may be transient... Command ':foo' not found. Try 'bazel help'. Retrying exit code 2 because it may be transient... Command ':foo' not found. Try 'bazel help'. Retrying exit code 2 because it may be transient... Command ':foo' not found. Try 'bazel help'. Retrying exit code 2 because it may be transient... Command ':foo' not found. Try 'bazel help'. ╚╡./scripts/run_bazel.py --attempts=5 --retry-all-errors query //... | wc -l INFO: Invocation ID: ffdf9480-0245-442d-885f-ee91a3d86b68 Loading: 0 packages loaded 367 ╚╡./scripts/run_bazel.py --attempts=5 :foo Command ':foo' not found. Try 'bazel help'. ``` On the last run, [test (ubuntu-22.04, opt)](https://github.com/carbon-language/carbon-lang/actions/runs/14737410033/job/41366888473?pr=5386) has an example of this working: ``` INFO: Invocation ID: 3f276297-6dc5-4007-a333-dcadd4db55f4 no actions running no actions running no actions running no actions running no actions running no actions running no actions running no actions running no actions running WARNING: Download from https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz failed: class java.io.IOException GET returned 618 jwt:jwt-not-provided INFO: Repository bazel_skylib+ instantiated at: <builtin>: in <toplevel> Repository rule http_archive defined at: /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_tools/tools/build_defs/repo/http.bzl:392:31: in <toplevel> ERROR: /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_tools/tools/build_defs/repo/http.bzl:137:45: An error occurred during the fetch of repository 'bazel_skylib+': Traceback (most recent call last): File "/home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_tools/tools/build_defs/repo/http.bzl", line 137, column 45, in _http_archive_impl download_info = ctx.download_and_extract( Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz] to /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_skylib+/temp62784[869](https://github.com/carbon-language/carbon-lang/actions/runs/14737410033/job/41366888473?pr=5386#step:5:887)09382546624/bazel-skylib-1.7.1.tar.gz: GET returned 618 jwt:jwt-not-provided no actions running no actions running ERROR: Error loading '@@rules_python+//python/extensions:python.bzl' for module extensions, requested by /home/runner/work/carbon-lang/carbon-lang/MODULE.bazel:147:23: at /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/rules_python+/python/extensions/python.bzl:48:6: at /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/rules_python+/python/private/python.bzl:17:6: at /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_features+/features.bzl:3:6: Encountered error while reading extension file 'globals.bzl': no such package '@@bazel_features++version_extension+bazel_features_globals//': no such package '@@bazel_skylib+//lib': java.io.IOException: Error downloading [https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz] to /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_skylib+/temp6278486909382546624/bazel-skylib-1.7.1.tar.gz: GET re ERROR: Error loading '@@rules_cc+//cc:extensions.bzl' for module extensions, requested by https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel:12:29: at /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/rules_cc+/cc/extensions.bzl:16:6: at /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_features+/features.bzl:3:6: Encountered error while reading extension file 'globals.bzl': no such package '@@bazel_features++version_extension+bazel_features_globals//': no such package '@@bazel_skylib+//lib': java.io.IOException: Error downloading [https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz] to /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_skylib+/temp6278486909382546624/bazel-skylib-1.7.1.tar.gz: GET returned 618 jwt:jwt-not-provided: at /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/rules_cc+/cc/extensions.bzl:16:6: at /h ERROR: Error loading '@@rules_python+//python/extensions:python.bzl' for module extensions, requested by /home/runner/work/carbon-lang/carbon-lang/MODULE.bazel:147:23: at /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/rules_python+/python/extensions/python.bzl:48:6: at /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/rules_python+/python/private/python.bzl:17:6: at /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_features+/features.bzl:3:6: Encountered error while reading extension file 'globals.bzl': no such package '@@bazel_features++version_extension+bazel_features_globals//': no such package '@@bazel_skylib+//lib': java.io.IOException: Error downloading [https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz] to /home/runner/.cache/bazel/_bazel_runner/8f839eaeb716f9d034eabdfa7ebecdb0/external/bazel_skylib+/temp6278486909382546624/bazel-skylib-1.7.1.tar.gz: GET re INFO: Invocation ID: e2062912-715f-47ec-a0bc-9d1b4fee9e5d no actions running no actions running no actions running no actions running no actions running no actions running <root> (carbon@_) Retrying a failure because it may be transient... INFO: Invocation ID: 7d4ee250-882f-480d-9c8d-2d92e67462fc Loading: 0 packages loaded 367 ``` |
||
|
|
e38ad83bfd |
Disable the Bazel disk cache on CI. (#4375)
This should free up quite a bit of space and even make our builds faster by avoiding duplicating every output. The syntax for this flag is counter intuitive, so I've left a comment explaining it. |
||
|
|
5332b71eec |
Add automated nightly builds, uploaded as pre-releases. (#4055)
There is still a lot more we should try to do here, but this gets us a decent start and should be enough for some of the developers working on Carbon to use for simple cases, or tools like Compiler Explorer. This first factors most of the complex setup for our CI workflow into local actions that we can reuse in other workflows. It's actually a fairly nice cleanup I think even without the specific use case of a nightly release process. These use "composite" actions which is the cleanest model for factoring out a subsequence of steps from a workflow. I've tried to keep the inputs fairly minimal and easy to spot. Next, it adds a cron-scheduled action that builds and creates a nightly release. It also supports explicitly running the workflow, which can be useful if the nightly release is broken in some way: a fix can be landed and then a force run used. Tested the `tests` workflow using our `action-test` branch: https://github.com/carbon-language/carbon-lang/actions/runs/9545546278 Also tested the nightly release action by hacking in a `push` trigger and using *draft* release. If you have admin rights, you can see an example draft nightly build here: https://github.com/carbon-language/carbon-lang/releases/tag/untagged-6a85cdce7b3a784a2e6b Note that the GitHub releases are easily deleted, and even the tags created in the repository can be cleaned up as needed so it should be fairly harmless to fix this forward if needed. |