-
Notifications
You must be signed in to change notification settings - Fork 289
Migrate CI to GitHub Actions #813
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
Conversation
r? @gnzlbg (rust_highfive has picked a reviewer for you, use r? to override) |
0daa871
to
85d71e6
Compare
This involves less secret and user management than azure pipelines, has more concurrency by default for repos, and in general has a bit more modern syntax!
85d71e6
to
dbba50c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This naturally isn't hooked up yet to bors and at this point I don't believe that anyone's hooked up a github actions check to bors yet. If this needs to be hooked up to bors then that will take some more investigation.
git init | ||
git add . | ||
git -c user.name='ci' -c user.email='ci' commit -m init | ||
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is implicitly set by GitHub Actions, so no need to out of our way to set extra tokens and whatnot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, wow, this is great!
.github/workflows/main.yml
Outdated
name: Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put everything into the same matrix here, and I did away with the stage0/stage1 tests to instead just limit the concurrency, which I believe achieves the same goal as before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concurrency limit was there because of cross-repo queues, but IIUC github actions has a per-repo queue with a per-repo limit right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure about the queueing algorithm of github actions, and I suspect that it's still in flux. I believe it's per repo though yeah now that you mention this, so I can certainly remove this. Worth mentioning if it's needed in the future though!
# macOS targets | ||
- x86_64-apple-darwin | ||
# FIXME: gh-actions build environment doesn't have linker support | ||
# - i686-apple-darwin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead of using macos-latest
there is a slightly older image that one can use ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately there's only one image right now (aliased as macos-latest
) and it doesn't have support for i686-apple-darwin, but I don't think i686-apple-darwin is covering much that i686-unknown-linux-gnu isn't already covering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main reason the latest image doesn't support it is because the target is deprecated, so...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah at some point we're gonna need to start talking in rust-lang/rust about dropping the target, but that's still a bit down the road!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait I was wrong. MacOSX 10.13 deprecated the target, and now it is removed in 10.14, and 10.15 is in beta.. As long Azure or Travis offer VMs with MacOSX <= 10.13 rust-lang/rust can produce binaries for it, but it wouldn't surprise me if github actions doesn't add VMs for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True yeah, at this time Github Actions only supports 10.14 and doesn't have old enough Xcode sdks to target i686-apple-darwing (or at least not that I've been able to figure out). GitHub Actions is still somewhat in flux though, so you're right that they may eventually add support
steps: | ||
- uses: actions/checkout@master | ||
- name: Install Rust (rustup) | ||
run: rustup update nightly --no-self-update && rustup default nightly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is --no-self-update required on github actions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it is for now on Windows yeah. The windows environment has permissions such that you can't self-update the rustup.exe
executable. They're purportedly working on fixing it, but it's not fixed yet :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Azure had the same issue :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it's worth pointing out that azure pipelines and github actions share most of their infrastructure, so limitations in one tend to be in the other as well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this LGTM. Feel free to merge once you think its ready. About bors, its going to have to support this sooner or later, but I think its ok to just manually merge PRs here until it gains support. So I wouldn't block landing this on that.
Looks like it's got quite a few errors
0ad081d
to
5bdea7d
Compare
This involves less secret and user management than azure pipelines, has
more concurrency by default for repos, and in general has a bit more
modern syntax!