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

Introduces initial draft of nightly binary publishing #175

Merged
merged 1 commit into from
Aug 27, 2021

Conversation

sezna
Copy link
Contributor

@sezna sezna commented Aug 24, 2021

Closes #79

See the deploy for this PR here: https://github.com/FuelLabs/sway-nightly-binaries/tree/master/nightly-2021-08-26:16:34:12-9f01b41

Summary

This PR builds x86 MacOS and x86 Linux images, makes a new folder of the format nightly-$DATETIME-$SHORT_SHA, and uploads sway-server and forc to subdirectories corresponding to the build arch on every push to master.

Other Notes

Some of our crates unfortunately do not support cross compilation. Because of this, we can only compile for targets that Github has runners for. This page has the available options for Github-hosted runners. Unless Github introduces an ARM runner, or we self host our own runners, we can only build x86 targets for now.

This PR builds and deploys x86 MacOS images and x86 Linux images. It would also be easy to add Windows, if we wanted, since Github has a runner for it. That being said, I'm not sure we want to sign up for supporting Windows.

I propose as a temporary work-around that we manually upload ARM/M1 images as needed when consumers want them. I can run the builds myself and upload them to the nightlies repo.

I also changed the cargo test stage so that it only runs if you change any .rs, .sw, or .toml files. I thought that might save us some minutes when editing yaml files and stuff.

@sezna sezna marked this pull request as draft August 24, 2021 23:30
@adlerjohn adlerjohn added the ci label Aug 24, 2021
@sezna sezna force-pushed the sezna/auto-deploy-binaries branch from 1afeb2f to b6f01d9 Compare August 25, 2021 01:01
@sezna sezna marked this pull request as ready for review August 25, 2021 01:01
@adlerjohn
Copy link
Contributor

adlerjohn commented Aug 25, 2021

CI failing

@sezna sezna force-pushed the sezna/auto-deploy-binaries branch 2 times, most recently from de7f042 to cd79685 Compare August 25, 2021 02:20
@sezna
Copy link
Contributor Author

sezna commented Aug 25, 2021

Whoops. Fixed now. And here's the first release: https://github.com/FuelLabs/sway-nightly-binaries

Only the sway server in that one but the rest will have forc and sway-server. Anything else we should be including?

@sezna sezna requested a review from adlerjohn August 25, 2021 02:33
@sezna sezna force-pushed the sezna/auto-deploy-binaries branch from cd79685 to b47cb7b Compare August 25, 2021 02:36
Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

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

Looks good! Two things:

  1. Probably want to use time down to the seconds, to avoid multiple commits on the same day being out of order.
  2. Can you also compile for arm64, and make separate directories for different archs?

@sezna
Copy link
Contributor Author

sezna commented Aug 25, 2021

Sounds good. How about these for now?

  1. aarch64-apple-darwin
  2. aarch64-unknown-linux-gnu
  3. x86_64-apple-darwin
  4. x86_64-unknown-linux-gnu
  5. One of x86_64-pc-windows-gnu or x86_64-pc-windows-msvc. I'm not sure which is better for Windows. Do you know?

I think that's enough for now, unless you want to support riscv or mips...or power pc...

@adlerjohn
Copy link
Contributor

I think we can omit Windows for now since we don't really have any way of testing it. If devs want it we can add it to our pipeline. The rest are fine.

@sezna sezna marked this pull request as draft August 25, 2021 03:29
@sezna sezna force-pushed the sezna/auto-deploy-binaries branch from b47cb7b to c7e422e Compare August 25, 2021 03:30
@sezna
Copy link
Contributor Author

sezna commented Aug 25, 2021

Sorry for all those subscribed to this issue. The convert_to_draft github endpoint is returning a 404, and I'm going to need to do some iteration here to get the action to work. You might get spammed. I'll re-request review when it is ready.

Edit: Apparently it went through even though it 404'd. Whatever.

@sezna sezna force-pushed the sezna/auto-deploy-binaries branch 3 times, most recently from f58d572 to 90dcfad Compare August 25, 2021 21:39
@sezna sezna marked this pull request as ready for review August 25, 2021 21:41
@sezna sezna force-pushed the sezna/auto-deploy-binaries branch 3 times, most recently from 72cc5ef to cfdaf37 Compare August 26, 2021 14:53
@sezna sezna requested a review from adlerjohn August 26, 2021 16:36
@sezna sezna force-pushed the sezna/auto-deploy-binaries branch from 9f01b41 to 6da5c98 Compare August 26, 2021 16:51
@sezna sezna merged commit 45866bf into master Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nightly CI builds
2 participants