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

Tear Down Action #193

Open
wSedlacek opened this issue Sep 6, 2021 · 5 comments
Open

Tear Down Action #193

wSedlacek opened this issue Sep 6, 2021 · 5 comments

Comments

@wSedlacek
Copy link

It would be nice if after the job was complete if the downloaded SDK would be automatically deleted.

@wSedlacek
Copy link
Author

Maybe using the RUNNER_TEMP folder rather than os.homedir() would be better?

@ViliusSutkus89
Copy link
Collaborator

const HOME = os.homedir()
const ANDROID_HOME_DIR = path.join(HOME, '.android')
const ANDROID_HOME_SDK_DIR = path.join(ANDROID_HOME_DIR, 'sdk')
let ANDROID_SDK_ROOT = process.env['ANDROID_SDK_ROOT'] || ANDROID_HOME_SDK_DIR

You can workaround this by setting ANDROID_SDK_ROOT environment variable.

We use $HOME/.android/sdk because AFAIK that is the default location for Android SDK tools.

@wSedlacek
Copy link
Author

That sounds like a good work around.
Thank you.

My biggest concern would be around multiple runners on the same system trying to modify the same files for setup.

@ViliusSutkus89
Copy link
Collaborator

My biggest concern would be around multiple runners on the same system trying to modify the same files for setup.

I'll go with a definite maybe here. It depends on what happens with RUNNER_TEMP. Also, if you have multiple runners on the same machine, do you really want to constantly reinstall the tools?

@wSedlacek
Copy link
Author

wSedlacek commented Sep 10, 2021

Also, if you have multiple runners on the same machine, do you really want to constantly reinstall the tools?

Unless I explicitly cache the install directory that would be my expectations of a CI environment.
That is to say I would expect the only variance run to run to be that of the cache or uncontrollably external circumstances like server load.
Other similar actions like setting up node behave this way as far as I understand, where they reinstall on each attempt.

For permanently changing the environment I would expect to either change the image I am using for the runners or otherwise manually setup the server with the dependencies.

This isn't to say that having it implicitly leave the sdk installed doesn't work, as clearly it does, it just wasn't what I had expected given how other similar actions work.

I'll go with a definite maybe here. It depends on what happens with RUNNER_TEMP

If your concern is around having multiple runners point at this cache, I believe that default and expected use case is that this be unique per runner given that other similar directories like _work need to be unique to function with even basic task like git checkout.

Across all of my self hosted runners this is unique per each one.

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

No branches or pull requests

2 participants