Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions configuration #70190

Merged
merged 10 commits into from
Mar 24, 2020
Merged

Add GitHub Actions configuration #70190

merged 10 commits into from
Mar 24, 2020

Conversation

pietroalbini
Copy link
Member

This PR adds the GitHub Actions configuration to the rust-lang/rust repository. The configuration will be run in parallel with Azure Pipelines until the evaluation finishes: the infrastructure team will then decide whether to switch.

Since GitHub Actions doesn't currently have any way to include pieces of configuration, this also adds the src/tools/expand-yaml-anchors tool, which serves as a sort of templating system. Otherwise the configuration is a mostly straight port from the Azure Pipelines configuration (thanks to all the PRs opened in the past).

There are still a few small things I need to fix before we can land this, but it's mostly complete and ready for an initial review.

r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 20, 2020
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me, though I'm not a fan of duplicating the Azure and GitHub CI configs into two separate files, it looks like they're similar enough that's it's not too much trouble to change both.

Could you make sure that the Azure file has a header asking folks to update the GHA file as well? (I don't think I saw one but might have missed it).

env:
CI_JOB_NAME: "${{ matrix.name }}"
SCCACHE_BUCKET: rust-lang-gha-caches
TOOLSTATE_REPO: "https://github.com/pietroalbini/rust-toolstate"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I presume we'll be updating these to point at correct locations when we decide to switch over, roughly speaking?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep.

src/bootstrap/run.rs Outdated Show resolved Hide resolved
src/ci/docker/mingw-check/Dockerfile Show resolved Hide resolved
@pietroalbini
Copy link
Member Author

Let's see if it works correctly with try builds.

@bors try

@bors
Copy link
Contributor

bors commented Mar 20, 2020

⌛ Trying commit a080702fc7582d0c172934112cb9abd2ddb5f7f0 with merge 1bc752e5fdcdf5def64f3228d18e8ae24b1ff36c...

@bors
Copy link
Contributor

bors commented Mar 20, 2020

☀️ Try build successful - checks-azure
Build commit: 1bc752e5fdcdf5def64f3228d18e8ae24b1ff36c (1bc752e5fdcdf5def64f3228d18e8ae24b1ff36c)

@pietroalbini
Copy link
Member Author

Ok I need to configure security credentials on the separate organization.

@pietroalbini
Copy link
Member Author

Configured the secrets and added the header to the Azure Pipelines configuration telling contributors to keep GitHub Actions in sync. This is now ready for review @Mark-Simulacrum

Let's try this again to make sure the secrets work:
@bors try

@bors
Copy link
Contributor

bors commented Mar 23, 2020

⌛ Trying commit a757a10296032c50e2c589e4eb517ea98d9c7adf with merge 2c50982ca6bf408d009a6da76bc697d25a0d8c37...

@bors
Copy link
Contributor

bors commented Mar 23, 2020

☀️ Try build successful - checks-azure
Build commit: 2c50982ca6bf408d009a6da76bc697d25a0d8c37 (2c50982ca6bf408d009a6da76bc697d25a0d8c37)

@Mark-Simulacrum
Copy link
Member

Seems fine to me. As we've discussed previously I'm not really happy with the duplication here but it seems unavoidable (and likely quite temporary) so I'm not too opposed to it.

r=me when ready.

@pietroalbini
Copy link
Member Author

Let's do this then! 🎉

@bors r=Mark-Simulacrum rollup

@bors
Copy link
Contributor

bors commented Mar 23, 2020

📌 Commit a757a10296032c50e2c589e4eb517ea98d9c7adf has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 23, 2020
@Centril
Copy link
Contributor

Centril commented Mar 24, 2020

@bors rollup=maybe

@pietroalbini
Copy link
Member Author

@bors rollup

This is safe to rollup.

@bors
Copy link
Contributor

bors commented Mar 24, 2020

☔ The latest upstream changes (presumably #69894) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 24, 2020
There will be a need to symlink the Linux build directory in the future
as well, so let's make the script name generic.
On Azure Pipeliones, the C: filesystem is huge with a lot of free space,
while D: is small. By default builds happened in D:, so we added a
script to symlink the big directories to C:, granting us more space.

    Filesystem  Size  Used Avail Use%
    C:          256G  143G  114G  56%
    D:           14G  2.0G   13G  15%

On GitHub Actions instead C: is almost full, and we have a lot of free
space on D:, where the build happens.

    Filesystem  Size  Used Avail Use%
    C:          128G  114G   15G  89%
    D:          56G   4.8G   52G   9%

This commit stops creating the symlink on GitHub Actions, fixing the out
of disk space errors we were seeing on some Windows builders.
The /mnt mount point has 53GB of free disk space at the time of writing
this commit, so this moves the build there to avoid running out of disk
space during builds.
Moving just the `obj` directory created problems with mountpoints and
Docker containers, so this tries to symlink the parent directory.
This will inform contributors tweaking the Azure Pipelines configuration
that they also need to tweak the GitHub Actions setup.
@pietroalbini
Copy link
Member Author

@bors r=Mark-Simulacrum p=1 rollup-

@bors
Copy link
Contributor

bors commented Mar 24, 2020

📌 Commit 45910e7 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 24, 2020
@bors
Copy link
Contributor

bors commented Mar 24, 2020

⌛ Testing commit 45910e7 with merge 2dcf54f...

@bors
Copy link
Contributor

bors commented Mar 24, 2020

☀️ Test successful - checks-azure
Approved by: Mark-Simulacrum
Pushing 2dcf54f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 24, 2020
@bors bors merged commit 2dcf54f into rust-lang:master Mar 24, 2020
@pietroalbini pietroalbini deleted the gha branch March 24, 2020 18:53
@jyn514 jyn514 added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. A-testsuite Area: The testsuite used to check the correctness of rustc labels Sep 23, 2020
@tisonkun
Copy link
Contributor

tisonkun commented Nov 5, 2021

@pietroalbini @Mark-Simulacrum hi here! I'd like to know whether ubuntu-latest-xl is self-hosted runners by rust-lang org?

@pietroalbini
Copy link
Member Author

It's not a self-hosted builder, is a sponsored private pool GitHub is maintaining for us.

@tisonkun
Copy link
Contributor

@pietroalbini thank you!

@ehuss ehuss mentioned this pull request Dec 23, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 28, 2021
Remove VCVARS_BAT

This environment variable is no longer used.  It was used in the original Azure Pipelines configuration (rust-lang#60777). When GitHub Actions were added (rust-lang#70190), it was no longer used, and I suspect it was just an oversight while transitioning the configuration.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 28, 2021
Remove VCVARS_BAT

This environment variable is no longer used.  It was used in the original Azure Pipelines configuration (rust-lang#60777). When GitHub Actions were added (rust-lang#70190), it was no longer used, and I suspect it was just an oversight while transitioning the configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants