game-ci / docker

Series of CI-specialised docker images for Unity.
https://hub.docker.com/u/unityci
MIT License
392 stars 122 forks source link

Need to add to setup on docket Windows/Ubuntu/Mac - long path #170

Closed studentutu closed 2 years ago

studentutu commented 2 years ago

Bug description

Git fails to clone project with a very long filename.

Our project has folders with a ton of recursive subfolders.

On our development portal, each contributor is required to set git long path.

How to reproduce

1) Create Unity project and put a file under Unity Assets folder:

Assets/Application/somelongappname/feature/OneVeryLongFeatureWithShortDescription/com.company/runtime/Library/thirdPartyVeryLongAndAnnoyingFolder/Prefabs/Models/FinalyOneVeryDistinctModelName.fbx

2) Run CI runner

4) See CI runner logs ( git fails to clone project)

-

Expected behavior

Git should clone project successfully.

Additional details

Problem is found both on Windows and on Linux distributions.

Solution

Run the following command before git clone operation: ''' git config core.longpaths true git lfs install --skip-smudge '''

webbertakken commented 2 years ago

Thank you for your bug report @studentutu

What's the error message exactly? And what is the workflow step that causes the error?

studentutu commented 2 years ago

@webbertakken

Workflow step for old version for Github Unity CI actions:

Steps represent a sequence of tasks that will be executed as part of the job

steps:
  # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  - uses: actions/checkout@v2

Message goes something like this :

error:unable to create file foldername/feature/......: Filename too long.

webbertakken commented 2 years ago

Recommend checking out this issue https://github.com/actions/checkout/issues/242#issue-616061629

Or if it does not solve the issue for you to create a new issue with actions/checkout https://github.com/actions/checkout/issues

I'm going to close this because there's nothing we can do from our side except redirect you to the correct repository.