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

Fix arm-runner CI issue #182

Merged
merged 1 commit into from
May 22, 2023
Merged

Fix arm-runner CI issue #182

merged 1 commit into from
May 22, 2023

Conversation

pguyot
Copy link
Contributor

@pguyot pguyot commented May 21, 2023

Add workaround for "Updating crates.io index" issue
Enlarge image to download build files
Bind mount repository as the goal doesn't seem to be to produce an image
Likewise, disable image optimization

Fixes pguyot/arm-runner-action/issues/77

Add workaround for "Updating crates.io index" issue
Enlarge image to download build files
Bind mount repository as the goal doesn't seem to be to produce an image
Likewise, disable image optimization

Signed-off-by: Paul Guyot <[email protected]>
@Benji377 Benji377 added bug Something isn't working enhancement New feature or request labels May 22, 2023
@Benji377
Copy link
Member

I tested it and it works wonderfully. As you pointed out, I am not trying to create an image, but instead I wanted to use your ARM Runner to compile Raspirus as an executable (.deb file) for the Raspberry Pi. Currently, I am using the GitHub Runner to compile code for Windows, Ubuntu and macOS: https://github.com/Raspirus/Raspirus/blob/main/.github/workflows/tauri.yml
Is it possible to upload the .deb file as an artifact? On your project, I only saw examples on how to upload the entire .img file

@pguyot
Copy link
Contributor Author

pguyot commented May 22, 2023

Yes you can upload artifacts.

If you use the bind_mount_repository: true option as in my PR, files created within the checkout directory will be accessible after the action is run.

So you can upload them using a standard upload artifact action.

Alternatively you can use the copy_artifact_path and copy_artifact_dest options.

The tests for these options can help:

https://github.com/pguyot/arm-runner-action/blob/main/.github/workflows/test-bind_mount.yml

https://github.com/pguyot/arm-runner-action/blob/main/.github/workflows/test-artifact.yml

https://github.com/pguyot/arm-runner-action/blob/main/.github/workflows/test-globbed-artifacts.yml

https://github.com/pguyot/arm-runner-action/blob/main/.github/workflows/test-multiple-artifacts.yml

@Benji377
Copy link
Member

Great, thank you!

@Benji377 Benji377 merged commit 0ec2c08 into Raspirus:main May 22, 2023
@Benji377
Copy link
Member

@pguyot Sorry to bother you again, but I just noticed that the action takes about 4 hours to create my executable. I just wanted to know if there is something I could enhance, maybe some way of caching dependencies? If not it's ok, I can let it run overnight, it just shouldn't exceed the maximum of 6 hours, because GitHub would then forcefully terminate it.

@pguyot
Copy link
Contributor Author

pguyot commented May 22, 2023

You can indeed use GitHub cache action.

Have you considered using cross-rust? At least to cross-compile some packages? It took 2 hours to install tauri-cli, while with cross-rust, it only takes 9 minutes.

See this build:
https://github.com/pguyot/Raspirus/actions/runs/5049517320/jobs/9059066053

With this workflow:
https://github.com/pguyot/Raspirus/blob/w20/use-rust-cross/.github/workflows/rasp-runner.yml

I didn't copy the rust compiled files, they should be copied to the repository's directory so they'll be available in the qemu environment, but I guess you can work from there if you want to explore this path. The trick was to select the features with the vendored openssl library.

@Benji377
Copy link
Member

Thank you for providing your example, the speed boost is impressive. I will do some more testing and see what else I can do outside the Runner. Especially caching dependencies might be a good idea. Thank you for your help again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Rust build possibly running out of RAM
2 participants