Commit Graph
89 Commits
Author SHA1 Message Date
Chandler Carruth cce013b43e Use high concurrency on CI build & test. (#3192)
The expensive local actions will be separately gated to not overwhelm
the machine, and currently highly asynchronous actions are a dominant
part of our builds due to downloading cached artifacts. Without a high
concurrency, these are downloaded roughly 2-at-a-time currently.

I've verified that on a small machine without a good cache this doesn't
seem to generate huge amounts of work and local build and test actions
are successfully gated on the local flags.

There is already a Bazel issue tracking this limitation:
https://github.com/bazelbuild/bazel/issues/6394
2023-09-05 20:06:41 +00:00
Geoff Romer f4d45c8d88 Fix newline formatting in stale-issue message (#3045)
YAML string literals don't seem to support escape sequences like `\n`,
so `\n\n\n` was showing up literally in the issue messages.
2023-08-01 19:33:00 +00:00
Jon Ross-Perkins 9c4188ab9f Free disk space because we seem to be encroaching on limits. (#3009)
At present, it looks like tools consume 3GB and fastbuild consumes 20GB
versus 23GB available. We've apparently been on the edge of this, and
are just now getting pushed over.


https://github.com/carbon-language/carbon-lang/actions/runs/5625169220/job/15243450729
shows what this looks like (review actions are run from trunk versions,
not this branch).
2023-07-21 23:17:07 +00:00
Jon Ross-Perkins f4fd12def9 Use paths-filter to fix the test action. (#2972)
Trying to fix merge queue support for PRs that don't need tests, #2971
didn't work because it lacks the matrix configuration. This takes a
different approach from that, instead filtering each step based on
affected paths. This way we're also less likely to see skew in behavior.
2023-07-06 18:08:45 +00:00
Chandler Carruth c75b41bb01 Add a fallback test workflow. (#2971)
To make this cleaner, this switches the main `test` workflow to use
exclusion path patterns as that was the clearly documented intent
anyways.

This works around a problem with required GitHub status checks:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore

Without something like this, we won't be able to use the merge queue (or
require passing tests).
2023-07-06 15:43:42 +00:00
Adrien Leravat f091a45c19 Infra: run pre-commit on merge groups (#2960) 2023-06-28 17:21:54 -07:00
Jon Ross-Perkins 594ebff23b Copy-paste paths since the action isn't running. (#2954) 2023-06-27 15:48:50 -07:00
Adrien Leravat 92d73985df CI: tentative enabling of tests workflow for merge group (#2933) 2023-06-24 12:08:50 -07:00
Jon Ross-Perkins 8aca184cdb Remove dependent issues trigger (#2815)
Essentially, on #2814 I noticed that saying `#2811 depends` [word break] `on #2813` led to this trigger activating. This led to me asking whether anyone uses it, and responses were okay with it being removed. It's had [limited use](https://github.com/carbon-language/carbon-lang/pulls?q=is%3Apr+%22By+Dependent+Issues%22+), so this shouldn't be expected to affect workflows (unfortunately partly because dependent PRs aren't handled well by GitHub's review interface).

Discussed [on Discord](https://discord.com/channels/655572317891461132/707150492370862090/1103721071221407835).

Also minor edit to replace `-` with `_` in pre-commit filename ([style](https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/cpp_style_guide.md#file-names)).
2023-05-15 13:58:20 -07:00
Jon Ross-Perkins b22e585285 Bump action versions. (#2591)
I was looking at this due to some warnings about node 12 deprecation. This resolves some of it, where updates are available. We'll probably need to keep half an eye on this for https://github.com/hkusu/review-assign-action/issues/20 and https://github.com/z0al/dependent-issues/issues/535, which haven't been addressed yet.

AFAICT no config versions are needed for these version bumps.
2023-02-11 11:00:30 -08:00
Jon Ross-Perkins 69117bc9c3 Exempt leads questions from inactive labeling. (#2589)
@chandlerc requested that leads questions not be marked inactive. These arise when there *isn't* a clear-cut answer, and so seem to make more sense to be effectively long-term.

The \n\n\n is trying to get a blank line between paragraphs. Right now it gets a newline, but the paragraphs sort of blend. I might need more \n's, don't know but I'll keep an eye on messages. The examples that I could find don't have multiple paragraphs.
2023-02-10 11:53:50 -08:00
Jon Ross-Perkins 2e6bf0dea6 Support using llvm-15 if GH images provide it (#2543)
A migration by GH that drops LLVM 14 is breaking builds. It seems to still be getting canaried, so this is showing as flaky behavior. I think it's https://github.com/actions/runner-images/pull/6871

The set of runs at https://github.com/carbon-language/carbon-lang/actions/runs/3970825811/jobs/6807006626 show the fix behavior.
2023-01-20 12:07:40 -08:00
Jon Ross-Perkins 09ac000305 Add some ls commands to help diagnose tool issues (#2540)
We're seeing some test runs where `clang` isn't in the path on macos. I suspect it's a bad image, and can't reproduce it, but want to add these commands to help provide debug info for potential future problems.

e.g., the `ls` output: https://github.com/carbon-language/carbon-lang/actions/runs/3963366092/jobs/6791110228

e.g., the bad image: https://github.com/carbon-language/carbon-lang/actions/runs/3963270727/jobs/6790912681
2023-01-19 18:24:13 -08:00
Chandler Carruth 2c198865ff Mark some other issue categories as not-stale. (#2496)
While we have a generic 'long term' label, it seems redundant for some
issues that are already labeled with something that clearly is
open-ended and not something we should expect to have a bounded
timeline. For example, we want to actively curate a backlog of design
ideas and good first issues for folks to browse and pick up, so we
shouldn't be marking them as inactive after any fixed time frame.
2022-12-22 19:17:51 -08:00
Jon Ross-Perkins cc9ea4da66 Add auto-labeling for some docs and infra. (#2481) 2022-12-20 11:17:45 -08:00
Jon Ross-Perkins 8dc12df71d Automate labeling of explorer and toolchain PRs (#2470)
Pixep has been doing this by hand, so offering up some automation.

This is derivative of other workflows for [path-filter](https://github.com/carbon-language/carbon-lang/blob/trunk/.github/workflows/assign_prs.yaml) and [using gh for labels](https://github.com/carbon-language/carbon-lang/blob/trunk/.github/workflows/proposal_labeled.yaml). It felt best to stick it in its own workflow rather than merging with assign_prs.yaml, just to make the boundary clearer (I believe the separate workflow is cheap).
2022-12-14 14:27:30 -08:00
Jon Ross-Perkins e45ab50e5b Switch testing to pre-installed versions of clang-14 (#2402)
We keep seeing fragility installing software, with both brew (e.g., the recent python issues) and apt.llvm.org (currently flaky).

At this point, images for both ubuntu and macos have versions of llvm-14 that seem to successfully compile:
https://github.com/carbon-language/carbon-lang/actions/runs/3474670746/jobs/5808098087

Although we may want to figure out a way to resume running llvm-15 so that we can see compatibility issues, this seems preferable for baseline testing in order to reduce maintenance churn.

In addition to the above changes, this also configures cancellation more precisely, and stops installing bazel/bazelisk (it should already be preinstalled).
2022-11-17 08:54:44 -08:00
Jon Ross-Perkins 3b4bb985fb Explicitly install python with --overwrite (#2393)
```
==> Pouring python@3.11--3.11.0.monterey.bottle.tar.gz
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3-3.11
Target /usr/local/bin/2to3-3.11
already exists. You may want to remove it:
  rm '/usr/local/bin/2to3-3.11'
```

Installing llvm with --overwrite didn't seem to pass it on dependencies, particularly python (https://github.com/carbon-language/carbon-lang/actions/runs/3464174572/jobs/5785378508). So this instead installs python separately, and then --overwrite works.

See https://github.com/carbon-language/carbon-lang/actions/runs/3464364789/jobs/5785802783 for the example passing run. The actions on this PR will probably still use the trunk version.
2022-11-14 14:33:03 -08:00
Jon Ross-Perkins f6466568af Fix the 'issue for leads' template (#2380) 2022-11-09 09:29:11 -08:00
Jon Ross-Perkins 418b28d12b Fix filter step reference (#2273)
* Fix filter step reference

* pipe
2022-10-12 17:45:33 -07:00
Jon Ross-Perkins 9b03367449 Remove duplicate template (#2239) 2022-09-30 10:33:11 -07:00
Jon Ross-Perkins b0060e5cfb Rename issue template yaml to yml (#2233)
The config.yaml doesn't seem to be getting seen. Judging by https://github.com/carbon-language/carbon-lang/tree/trunk/.github/ISSUE_TEMPLATE ("Customize the issue creation experience with a config.yml file.") I think yaml is allowed for a lot of things (including the templates) but not config.yml.

I'm renaming other files for consistency.
2022-09-30 10:14:04 -07:00
Jon Ross-Perkins df829f9ad4 Add a doc issue template (#2234) 2022-09-29 14:58:10 -07:00
Jon Ross-Perkins af92a1d2ab Add some issue templates (#2225)
ref: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository

example of how this is supposed to look: https://github.com/flutter/flutter/issues/new/choose
2022-09-29 10:25:34 -07:00
Jon Ross-Perkins 59b0ac1616 Remove copyright from PR template (#2227)
The template gets inserted into the PR description verbatim, copyright included, which wasn't my intent.
2022-09-28 16:25:03 -07:00
Jon Ross-Perkins 094408935c Add a skeletal PR template (#2226)
e.g. https://github.com/flutter/flutter/blob/master/.github/PULL_REQUEST_TEMPLATE.md

But I feel weird adding a checklist
2022-09-28 16:06:30 -07:00
Jon Ross-Perkins 9be6939ee9 Fix LLVM compilation issues (#2198)
We've been having issues with asan builds on linux. This change should fix all of that. A build run can be found at:
https://github.com/carbon-language/carbon-lang/actions/runs/3093378863/jobs/5005683059

(currently in progress, but I'm expecting it to succeed at this point)

It may be that the issues with asan builds were actually related to caching. That is, maybe the brew build command didn't change enough between v14 and v15 that the cache hits were still an issue. We did notice this with 15.0.0 versus 15.0.1 include paths (that is, bazel wasn't happy using the cached results of a 15.0.0 build due to the skew in include paths). In order to address this, I've added CACHE_VERSION to the remote_cache setup. I've also set up corresponding buckets in Cloud.

However, I'm also switching Linux to llvm-15 and apt. I'd originally been looking at this because the issues were linux-specific, and we've previously had linux-specific issues with Homebrew. Although it may have been the cache all along, I would prefer to keep this setup (if nothing else, it made the caching issues more obvious, even though we were still confused by the include path manifestation).
2022-09-20 14:21:02 -07:00
Jon Ross-Perkins 7e4e73b6c0 Specify llvm@14 (#2195)
This should be temporary while trying to diagnose why llvm@15 fails.
2022-09-19 16:20:54 -07:00
Jon Ross-Perkins 0c20fbb0e6 Switch to llvm apt for ubuntu (#2160)
We've been encountering issues installing llvm via brew on linux, e.g.:
https://github.com/carbon-language/carbon-lang/runs/8258419618?check_suite_focus=true

```
==> Reinstalling 2 dependents with broken linkage from source:
llvm, mpdecimal
```

(but then llvm doesn't get reinstalled)

This should resolve it:
https://github.com/carbon-language/carbon-lang/runs/8260573590?check_suite_focus=true
2022-09-08 16:41:33 -07:00
Jon Ross-Perkins 6a9326f9e7 Set HOMEBREW_NO_INSTALL_CLEANUP due to llvm reinstall errors (#2157)
Trying to address issues like:
https://github.com/carbon-language/carbon-lang/runs/8252863868?check_suite_focus=true

```
==> Reinstalling 2 dependents with broken linkage from source:
llvm, mpdecimal
```

But llvm doesn't get reinstalled (but we also probably don't need/want this, particularly building from source).
2022-09-08 09:28:00 -07:00
Jon Ross-Perkins 2bc6da2967 Try a different autoassign action (#2093)
This removes the separate data files, which have been failing to load properly ([example](https://github.com/carbon-language/carbon-lang/runs/7957047892?check_suite_focus=true)). This one wasn't working previously, but hopefully will with these changes (and it might've also just been a pull_request_target issue, but the silent "Resource not accessible by integration" failures aren't great).
2022-08-23 12:13:19 -07:00
Jon Ross-Perkins ed3a81aa08 Add action for wiki change notifications. (#2089)
Wiki can either be "require push access" or "everyone" -- apparently there's no other option. I've set it to "everyone" so that contributors can make edits without needing push access. So the options as I see it are:

- Leave wiki as "everyone" can edit, use this for notifications.
    - GitHub doesn't give notifications for wiki edits. This is trying a different approach for notifications.
- Grant push access to a larger group (contributors), don't add CODEOWNERS.
    - Not sure this is the right choice because of the implications around merges, but again maybe it'd be fine and we can expect the approval requirement to work out.
- Grant push access to contributors, add CODEOWNERS.
    - This causes the auto-assignment to CODEOWNERS that we don't want. (details in https://github.com/carbon-language/carbon-lang/pull/1367)
- Create a separate wiki repo so that we can differently handle push access.
    - This seems overly complex a solution though.

I'm hoping this approach works.
2022-08-23 12:11:58 -07:00
Jon Ross-Perkins 21311334cb Switch to pull_request_target (#2014)
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/#:~:text=The%20main%20differences%20between%20the,but%20not%20from%20external%20forks.

I'm hoping I actually have the cause of my issues right this time.
2022-08-12 11:57:25 -07:00
Jon Ross-Perkins efde2dcdd9 Switch token approach (#2013)
According to this run, the attempt to get write permissions failed:
https://github.com/carbon-language/carbon-lang/runs/7811743119?check_suite_focus=true

So I'm switching to an org secret, which I believe I can definitely make work.
2022-08-12 11:42:51 -07:00
Jon Ross-Perkins 767e712b47 Try adjusting permissions to label (#2012)
Context: https://github.com/carbon-language/carbon-lang/runs/7811528469?check_suite_focus=true

Permissions seem to be different from when I was testing, seeing if this is enough.
2022-08-12 11:27:09 -07:00
Jon Ross-Perkins 9b3f80c6d6 Switch proposal process from projects to labels (#1981)
This is being done because Projects v1 requires repo write access, a serious limitation for letting people use it. Projects v2 isn't a great option because it lacks event support. Labels are pretty stable in GitHub, so this switches to that.

Note this assumes we're fine renaming "decision: accepted" -> "proposal accepted", etc. There are two reasons for this:

1) To make it clear that this is a proposal-specific label, versus something like an issue for leads label.
2) Removing the colon because it was causing trouble with yaml syntax.

This also adds the "proposal draft" label, mainly to complete the taxonomy.

I was considering whether this should be a proposal itself, but it feels like maybe it's not necessary because it's a fairly low-key infrastructure change, and I'm not sure how much people were relying on the project board anyways.

I tested this in a personal repo, basically just poking at https://github.com/jonmeow/test/pull/2
2022-08-12 11:11:09 -07:00
Chandler Carruth a4a3cf0136 Create a sync-repos action. (#1863)
This will allow us to automatically create and maintain specific repos
based on the main repository here, pulling key files like the license
and other infrastructure and pushing them systematically to a narrow
repo. Things like editor plugins that are best packaged and installed
from a separate repos can still be developed in a central place, even
potentially sharing common things like grammars where useful.

Currently this will maintain a Vim plugin repository out of the
`utils/vim` directory, but can be easily expanded for other systems.
2022-08-06 15:42:41 -07:00
Jon Ross-Perkins 61fd0a1476 Rollback ubuntu disable (#1877)
Fixed upstream just as I was getting #1872 in
2022-08-01 18:25:13 -07:00
Jon Ross-Perkins 2ed6b6fe8f Temp disable ubuntu testing (#1872)
See #1865, it's broken and I don't see a quick fix.
2022-08-01 18:12:44 -07:00
SADIK KUZU 34a18b5e9e Update github workflow actions' versions (#1776)
Update github workflow actions' versions

* actions/checkout: v2 -> v3
* actions/setup-python: v3 -> v4
* pre-commit/action: v2.0.2 -> v3.0.0
* actions/setup-go: v2 -> v3
* actions/stale: v4 -> v5

Reference links: 

* https://github.com/actions/checkout/releases
* https://github.com/actions/setup-python/releases
* https://github.com/pre-commit/action/releases
* https://github.com/actions/setup-go#v3
* https://github.com/actions/stale#usage

`.github/workflows`:

* pre-commit.yaml
* stale.yaml
* tests.yaml
2022-07-27 14:35:15 -07:00
Jon Ross-Perkins 7d253dc08d Fix assign action in use (#1400)
I accidentally put in one I'd considered, instead of the one I'd decided was probably the best fit, and the names are so similar I didn't notice.

NOTE: This still isn't totally working, but I think it will when we go public.
2022-07-15 17:20:46 -07:00
8dd878b314 Remove CODEOWNERS (#1367)
Remove CODEOWNERS and rely on repository commit access

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
Co-authored-by: Geoff Romer <gromer@google.com>
2022-07-15 15:31:56 -07:00
Jon Ross-Perkins b626cb9c64 Run brew install on all platforms, and stop searching for clang-format (#1346)
This was noticed because macos stopped installing the brew llvm, and they don't have clang-format. However, our tests don't actually need clang-format (and even if they did, we should probably match the pre-commit version), so it seems superfluous to check for.

Keeping brew because there's an advantage to consistency on tool versions, just running it on all platforms instead of linux-only.
2022-06-28 13:09:24 -07:00
Jon Meow 6fe8411122 Refactor common script functionality and reimplement the buildifier pre-commit (#1080)
Moves common script logic into utils.py (not a great name, but couldn't come up with better). This is in particular to make the buildifier.py script really trivial, allowing that pre-commit to be easily added. However, scripts have also been diverging on how we find bazel, so I'm trying to unify that.

The advantage of reimplementing buildifier's pre-commit is that (a) we can now run buildifier server-side, and (b) we can stop advising installing it manually. Then the only Linux-specific package manager is Cargo, which is only used for watchman, which is optional -- so stop highlighting Linux-specific package managers in the tool instructions.
2022-02-22 10:10:41 -08:00
Jon Meow 58104dc364 Switch clang-format pre-commit to get 13.0.0 (#1066)
Also enable gh action, I'm expecting that to work now.
2022-02-08 17:42:12 -08:00
Jon Meow 18be5692a3 Remove submodules from actions, and enable more pre-commits (#1051) 2022-01-27 16:22:26 -08:00
Jon MeowandGeoff Romer 6a4901a995 Remove LLVM gtest dep and add pre-commit regression check. (#1040)
Co-authored-by: Geoff Romer <gromer@google.com>
2022-01-26 09:28:45 -08:00
Jon Meow cc1f3a6432 Workaround for libtool_check_unique errors (#1016)
e.g. https://github.com/carbon-language/carbon-lang/runs/4768894988?check_suite_focus=true -- I'm seeing this too frequently and wondering if we can duck it per https://github.com/bazelbuild/bazel/issues/14113#issuecomment-999794586
2022-01-13 14:21:13 -08:00
Jon Meow b672e34bd9 Turn fix_cc_deps into a pre-commit (#1015) 2022-01-13 14:01:45 -08:00
Jon MeowandChandler Carruth 5042d96863 Switch to a brew version of python3.9 (#778)
- brew instead of pyenv to centralize package management
  - can't recall why we used pyenv before, may not have been the best choice.
  - pyenv has been a burden in updating versions, a single `brew upgrade` works better
- python3.9 because it's the latest and greatest, feels weird going to old versions if we're recommending installs.
- bazel 5.0.0 pre-release due to https://github.com/bazelbuild/bazel/commit/b9fc66d327debcfbdb2964afdba35a1cc8919b81
  - earlier versions want `python` to be on the path, which pyenv did but brew does not

For most people this will mean: `rm -rf ~/.pyenv && brew uninstall pyenv && brew install python@3.9 && pip3 install -U pip && pip3 install pre-commit`, plus removing any `pyenv` invocations from the shell `rc` file.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2021-08-25 09:10:35 -07:00