Skip to content

Conversation

@bkslasher
Copy link
Contributor

@bkslasher bkslasher commented Jan 16, 2022

Set permissions inside of the builder before copying to reduce resulting image size.

Android image size got increased after implementing Hub 3.0:
ubuntu-2021.2.6f1-android-0.15.0
ubuntu-2021.2.6f1-android-0.16.0

@github-actions
Copy link

Cat Gif

@webbertakken
Copy link
Member

webbertakken commented Jan 16, 2022

First of all, thanks a lot for having a look at it so quickly.

I'm trying to understand this change before merging it.
Could you please explain how this reduces the image size?

And will this guarantee that the SDK permissions are still set correctly for unity versions (different SDK versions / locations)?

@webbertakken
Copy link
Member

See reference above, since we no longer 755 the android folder, the sdk manager is also no longer covered. So should we bring back that line as well?

@bkslasher
Copy link
Contributor Author

bkslasher commented Jan 16, 2022

I'm trying to understand this change before merging it. Could you please explain how this reduces the image size?

So, apparently a big recursive chmod increases image size by a lot. See here for example: ubuntu-2021.2.6f1-android-0.16.0
image

This change moves the chmod command into the builder image, so a new layer is not created in the resulting editor image.

See reference above, since we no longer 755 the android folder, the sdk manager is also no longer covered. So should we bring back that line as well?

/opt/unity/editors/$version/Editor/Data/PlaybackEngines is a parent directory for all the modules installed by Unity. That includes SDK, NDK and OpenJDK. I did it like this for simplicity.

Copy link
Member

@webbertakken webbertakken left a comment

Choose a reason for hiding this comment

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

I see. That makes sense indeed. Here's also a thread about it on stack overlfow.

Checking the size of the resulting image build (2021.2.8f1 android). The build it seems to be 13GB (uncompressed)

image

The previous build was 18GB (uncompressed)

image

Moving forward with the merge

@webbertakken webbertakken merged commit 5494187 into game-ci:main Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants