Closed yegor256 closed 2 years ago
Why do you still need this action if you already have GraalVM set up on your own runner? To set up the build environment for musl?
I'm not too familiar with self-hosted runner but I wonder whether caching would solve your issue.
@fniephaus on a self-hosted runner, the entire setup script is being executed from scratch every time. This is what I have to do now, in order to solve the problem (otherwise your action fails):
- run: rm -rf ~/.graalvm
- uses: graalvm/setup-graalvm@v1
with:
version: '22.0.0.2'
java-version: '11'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
Would be great, if you just add a new parameter: skip-if-installed
. Just check the presence of ~/.graalvm
and skip.
Did you create the ~/.graalvm
directory or was it created by a previous run of this action?
@fniephaus it is created by the previous run of the action
Ok, so essentially the action doesn't need to do anything if the ~/.graalvm
directory already exists. That should be easy to support although I'm surprised that self-hosted runners persist state like this. If the directory exists, we should let the action print an info instead of not doing anything silently.
one more question: the action also sets up environment variables and dependencies. are those also being persisted somehow or does the action still needs to set those up in subsequent runs?
@fniephaus they need to be set up, since it's a new session every time. But creating the same files are not necessary, they are already there.
Thanks for confirming. We'll look into this.
@fniephaus this is what I'm doing now and it works: https://github.com/yegor256/fibonacci/blob/f42c584f6c655b425b674995e4ea848e35ffcf22/.github/workflows/make.yml#L38-L44 But it's pretty slow, since installation happens on every build.
Could you please restart your builds and verify that things work now (without having to remove ~/.graalvm
)? ~/.graalvm
is no longer used by the way.
I'm using your action on my self-hosted server. Every time it downloads and installs GraalVM from scratch. Would be great to make it skip the entire setup if
/usr/bin/graalvm
is already there. Maybe make a special configuration option for this?