Commit Graph
31 Commits
Author SHA1 Message Date
Chandler Carruth 4034fa223d Update LLVM (and llvm-bazel). (#550)
This picks up a newer version of LLVM and the LLVM Bazel integration.
The big change here is that we can configure the LLVM targets that are
built, which allows us to dramatically reduce the build costs by
focusing on a couple of CPUs for the time being.

There are a few API updates needed as well.

This also rotates the cache version so we start with a clean Bazel cache
from here. Otherwise we'd potentially pay the cost of carrying around
stale bits of LLVM endlessly.
2021-05-25 15:21:57 -07:00
Chandler Carruth 80883db252 Add caching to our tests to avoid clean rebuilds. (#534)
This is both a bit tricky and really easy with Bazel. The easy part,
especially compared to other build systems is that we can do this
regardless of the state of the repository -- Bazel will hermetically
check that everything is up-to-date, allowing the cache to be a bit
stale but still totally functional.

The easy part is that we can just ask Bazel to use an output base that
we cache and restore. This is super nice and even avoids most of the
Bazel installation bits.

The tricky part is that we need this to reconnect correctly to the
installed tree, so we need to exclude a crucial symlink that will then
get re-created at the right moment.

This gets really tricky due to LLVM and Clang (and this we would
struggle with no matter what build system we used). Building LLVM
creates a *ton* of object code. Just a huge amount. As a consequence,
we'd run into GitHub's limit for action cache size (5gb) really quickly
with 4 configurations.

So we can do another bit of tricky business and exclude the downloaded
`external` tree. This gets rebuilt easily, and there's no real need to
download it with the cached state -- its downloaded either way.

There are two follow-ups that I'd like to make here. One is to prod the
Bazel team to make things like persisting your output base a bit easier
to do reliably. Even better to make it easier to do *partial*
persisting.

Second follow-up is to work to make our usage of LLVM *much* less
wasteful. There are a bunch of steps here from changing how we use
sanitizers to how LLVM is built. Those will be follow-ups though.
2021-05-23 18:19:38 -07:00
Jon Meow 2942c97424 Exclude migrate_cpp from GH testing action due to build overhead (#532) 2021-05-13 14:36:56 -07:00
Jon Meow 3ff01fa60d Remove ready for review action (#501)
I tried what I could, but I don't think this action will work while Carbon is private.

"Error: Resource not accessible by integration"
https://github.com/carbon-language/carbon-lang/runs/2441129284?check_suite_focus=true

I'd seen this mentioned on some actions:
https://github.com/marketplace/actions/github-project-automation#personal-access-token-secretsgithub_token

However, I thought it might've been a side-effect of the APIs they were using (I did have this running on a local repo), but I think fork PRs are where the problem lies...
2021-04-26 11:28:12 -07:00
Jon Meow e82cc5f73f Needs public repo (#500)
Using `jonmeow` was how #496 was originally set up, but I tested with `carbon-language`. I assume we do not want a public repo under `carbon-language`, and so I've already transferred ownership back to `jonmeow` in order to have a public repo again.

https://github.com/carbon-language/carbon-lang/runs/2440951027?check_suite_focus=true
2021-04-26 11:04:02 -07:00
Jon Meow 2b58192ffa Try automating 'ready for review' on proposals. (#496) 2021-04-26 10:46:57 -07:00
Jon Meow 8b78a85276 Action to label proposals based on project column (#484)
Note there's a roughly minute delay due to action latency.
2021-04-22 14:43:38 -07:00
Chandler Carruth eb85d3dce9 Add back synchronize events for deps. (#440)
This probably isn't exactly right, but it at least gives *some* low
latency way to update when all the dependencies have been addressed.
Right now, I think only the cron run will unblock dependent PRs.
2021-04-08 09:41:55 -07:00
Chandler Carruth b414e71182 Bazel handles python modules now. (#441)
Remove them from our test CI workflow.
2021-04-08 09:38:49 -07:00
Jon Meow 7716ac6784 Update pre-commit (#439) 2021-04-08 09:01:35 -07:00
Chandler Carruth 2606046477 Switch to the dependent-issues action. (#432)
This supports tracking PR-to-issue and issue-to-issue dependencies in
addition to PR-to-PR, and this seems likely to be increasingly important
as we have decisions being made via issues.
2021-04-06 01:50:01 -07:00
Matthew Riley b8f6602857 Change Python version in CI to match the new minimum in our docs (#405)
This will help keep us honest about not using newer features.
2021-03-20 01:59:27 -07:00
Chandler Carruth 80f87f89a1 Exclude our build and test action from doc-only changes. (#390)
No since spending the GitHub action minutes (or waiting to merge) on
Bazel when only changing markdown or other files that aren't part of the
build and test.
2021-03-12 19:59:32 -08:00
Dave Abrahams de6995c8c3 [Infrastructure] Set up a dependent PR check (#343)
https://github.com/marketplace/actions/pr-dependency-check

Fixes #337
2021-03-09 15:11:09 -08:00
Chandler Carruth 5d6593ee39 Speed up and simplify the configuration of testing CI. (#335)
This is primarily using the configuration matrix facilities of GitHub
actions to consolidate the overall configuration. Beyond avoiding
duplication, this also allows the default and release builds to run in
parallel. The checkout time is duplicated between these, but the rest of
the time is nicely parallelized. This has the most dramatic effect on
macOS builds. Overall, this should reduce the latency on testing from
22-28 minutes to 15-20 minutes from what I've seen which seems
worthwhile.

This does reduce the detail provided in the names of the different
configurations. However, the Bazel build mode is preserved. That seems
like the most critical pieces of information.

Much of this started with me just trying to learn more about GitHub
actions, but once understanding how the job matrix worked, it seemed
worthwhile to send out as an actual change.
2021-03-05 18:35:30 -08:00
Dave Abrahams 5ea7fd44c1 Don't recursively fetch submodules in CI. (#338) 2021-03-03 17:15:32 -08:00
Dave AbrahamsandChandler Carruth 1204f2bdcc GitHub testing action (#331)
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2021-03-02 19:22:33 -08:00
Jon Meow 9a04cd8d61 Enable clang-format and buildifier presubmits (#236) 2021-01-13 09:41:53 -08:00
Jon Meow 1e8930e21b Bazelify the jekyll handling. (#230)
- Shift some things around to adjust to being in bazel.
- Add separate build/serve/publish scripts for use by bazel (not set up for direct execution, but bazel requires +x).
- Fix some tests I noticed not running unittest.main as a result of the switch.
- Move md files into filegroups for build reuse.
- Disable automatic site publishing (now `bazel run //website/jekyll:publish`)

Site publishing seems like it'd be too much trouble to keep automated... The C++ toolchain essentially needs to be set up due to the repo config, along with syncing the LLVM submodules, etc. That seems a bit annoying to do on each run of the publish-docs action, and not something I really want to maintain. If we get a CI, we can focus on it more there, but this feels like it'd just be a one-off to maintain as a github workflow.
2020-12-29 15:15:24 -08:00
Jon Meow e3584dce01 Switch build/site to build-site in order to keep symlinks working (#211)
The jekyll build keeps top-level without expanding them. So the site works, but the publish copy failed because some symlinks to files that aren't visible through the site (like CONTRIBUTING.md, versus the site's CONTRIBUTING.html) didn't work.
2020-12-04 16:17:36 -08:00
Jon Meow f2d48f1bd0 Move the jekyll sidebar to a python script for consistent generation. (#205)
One implication here is that both proposals/README.md and the website should use basically the same format for their proposal lists. Another subtle change is that the website sidebar was previously sorted by *filename*, and is now sorted by *title*, which seems better because it's something that readers can see.

Enumerating why files change:

- gen_sidebar.py is the centerpiece, with a couple helpful functions for re-use elsewhere
- Delete the old sidebar html includes
- Modify the Makefile to handle gen_sidebar.py reasonably well (let's be honest... I'm not great at Makefiles)
- Move proposal listing out to its own file (proposals.py) for re-use
- Add a few PYTHONPATH things + `__init__.py` files to get modules importing correctly (may be a better way at this, I've hit a wall though).
2020-12-04 08:26:25 -08:00
Jon Meow 58554b87ae Fix website dir move from merge (#204) 2020-12-03 13:29:21 -08:00
Jon Meow 5760d807fe Update pre-commit configs and standardize yaml extension (#184) 2020-10-29 10:02:32 -07:00
Jon Meow a768b0ee19 Adjust copyrights based on carbon-project-tools/#3 (#171) 2020-10-09 10:18:06 -07:00
Chandler Carruth 444e48c210 Restrict publishing job to the main repository. (#104)
See the
[documentation](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif)
for details on the syntax, and the [context
docs](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context)
for the API used.
2020-07-09 14:48:51 -07:00
Bryce Adelstein Lelbach aka wash 15b0971eae Correct references to the default branch to use the new name, trunk. (#101) 2020-07-03 00:49:36 -07:00
Jon Meow 551de7db93 Use https://github.com/pre-commit/action (#85)
This will run checks and fail if there's a problem. It'll show on PRs alongside the CLA check.
2020-06-25 08:42:55 -07:00
Jon MeowandChandler Carruth f1e4323fda Set up pre-commit (#73)
Added here:

- .pre-commit-config.yaml
- docs/project/contribution_tools.md
- src/scripts/pre-commit-toc.js
- CONTRIBUTING.md
- proposals/* (just to switch TOC formats)

The rest consists of auto-generated fixes.

The switch from doctoc to markdown-toc is because doctoc wants to put a TOC in every file, whereas markdown-toc only does it if you have an insertion point.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2020-06-16 09:09:10 -07:00
Jon Meow 0641a7f30b Fix the renamed build action (#55) 2020-06-04 15:39:59 -07:00
Jon Meow de80a96752 Update jekyll action to push the formatted site (#20)
This is a mix of fixes to the action itself and the jekyll files to make everything work.
2020-05-21 10:13:12 -07:00
Eric 94c6bc9a3f Add github action to publish docs. (#8)
* Add github action to publish docs.

This change add a placeholder action which:

(A) Authenticates with gcloud using the appropriate GCP AS.
(B) Copies the docs/ folder as-is into
www.carbon-lang.dev/test-doc-root/
2020-05-04 20:09:09 -04:00