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

automate the manual switchover for stable #71

Closed
clux opened this issue May 31, 2020 · 7 comments
Closed

automate the manual switchover for stable #71

clux opened this issue May 31, 2020 · 7 comments

Comments

@clux
Copy link
Owner

clux commented May 31, 2020

Currently, I make a few git actions to get travis to release a new stable image, but would like to be able to step away and not miss the patch releases.

We could automate this pretty easily if there is an API to get the latest stable rust release (just the version), I just haven't found it. If anyone know it would be very helpful!

@clux
Copy link
Owner Author

clux commented May 31, 2020

I tried doing a curl to github releases for rust-lang, but it kept giving me empty lists, so I gave up :|
Maybe I fsked it up though.

@AnderEnder
Copy link

AnderEnder commented May 31, 2020

@clux,
I have a draft idea for github action ci:

@clux
Copy link
Owner Author

clux commented May 31, 2020

Ooh. Yeah, that is promising. pkg.rust.version seems to have the latest stable in the middle of it, do you know if the file is reliably updated?

Might just try to make an extra daily travis-ci cronjobs (to avoid making more ci systems within this repo), and setup a stable branch to trigger it on.

Your system does sound more modern, with github actions, I'll check what you're doing in your fork :-)

@clux
Copy link
Owner Author

clux commented May 31, 2020

Quick toml parsing logic;

def rust_stable_version():
    """Retrieve the latest rust stable version from static.rust-lang.org"""
    url = 'https://static.rust-lang.org/dist/channel-rust-stable.toml'
    req = urllib.urlopen(url)
    data = toml.loads(req.read().decode("utf-8"))
    req.close()
    return data['pkg']['rust']['version'].split()[0]

@clux
Copy link
Owner Author

clux commented May 31, 2020

Well, think there's a second travis cronjob now on the stable branch. Guess we'll see if this works on Thursday.

@AnderEnder
Copy link

My draft injected shell script:
https://github.com/AnderEnder/muslrust/blob/switch-to-github-actions/.github/workflows/cron.yml

toml manifest provides only date, but I get the last date-time from last-modified http header. It should be correct enough, because it was taken from s3 metadata.

I would like to test it and will provide the PR .

The manifest file is used by rustup, so it is the most reliable source.

@clux
Copy link
Owner Author

clux commented Jun 18, 2020

Just for closure, ended up taking your original draft idea above, and made it work (in parallel with your testing on github actions) on travis. Forgot to close and respond.Sorry.

Still, really appreciate you helping out here. Your idea made all the difference - even if it's still travis here.

Travis has worked really well for me for this repo; let me run these 8min jobs daily for years, free - so am happy to have gotten it to a state where i could just keep it like that and leave it. The github action solution does looks really nice as well though. I'll probably look at that again that for any new repos I make.

At any rate, this is automatic here as well (as proved by 1.44.1), so closing.

@clux clux closed this as completed Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants