unity-actions icon indicating copy to clipboard operation
unity-actions copied to clipboard

Example on YAML file if builder is running on windows.

Open hayone1 opened this issue 4 years ago • 3 comments

Context I recently decided to use self-hosted runners for my builds as GitHub kept reporting that the Gradle build daemon disappeared unexpectedly because it may have been killed or may have crashed. This happens when building for android with IL2CPP as an apk or aab. I am generally new in the CI/CD field

Assuming it's a resource constraint, I set up a self-hosted runner using one of my older PCs which runs on windows10 but my build still fails, here is the error message.

Run git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id cut : The term 'cut' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\actions-runner_work_temp\d1109aa3-d8f3-422e-bdc2-29bcdc1fea92.ps1:2 char:23

  • git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
  •                   ~~~
    
    • CategoryInfo : ObjectNotFound: (cut:String) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : CommandNotFoundException

Suggested solution I presume that the syntax for the desired action is different for a windows machine? So can a parallel syntax be provided for a windows builder?

hayone1 avatar Nov 14 '21 12:11 hayone1

Note that this is not part of any action, but an inline step that helps put LFS files in cache.

image

We've not created a Windows-equivalent of that command yet as it was supposed to be quite temporary. That said it's probably useful to add a line that windows users can uncomment.

Perhaps we could so something like suggested here. Accepting contributions for this.

That said, as you're not using an ephemeral runner, you might be able to skip these steps entirely. In that case, don't forget to adjust configuration for the checkout step to include LFS files during checkout.

webbertakken avatar Nov 14 '21 13:11 webbertakken

Note that this is not part of any action, but an inline step that helps put LFS files in cache.

image

We've not created a Windows-equivalent of that command yet as it was supposed to be quite temporary. That said it's probably useful to add a line that windows users can uncomment.

Perhaps we could so something like suggested here. Accepting contributions for this.

That said, as you're not using an ephemeral runner, you might be able to skip these steps entirely. In that case, don't forget to adjust configuration for the checkout step to include LFS files during checkout.

Would it be possible to write a workflow file for Azure Pipeline instead but still using the ubuntu-latest this time.

hayone1 avatar Nov 16 '21 23:11 hayone1

Sure thing! It is possible to create an Azure pipeline. However that would involve implementing the logic that is currently encapsulated in our actions, and maintain it yourself. Note that it would be far out of scope for this issue.

If you like to move forward with this we would recommend following our GitLab documentation and examples. The implementation is conceptually largely be the same, but syntactically different.

webbertakken avatar Nov 17 '21 00:11 webbertakken