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

Fix CI failures caused by setup-ocaml@v3 #5912

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

edwintorok
Copy link
Contributor

Workaround for ocaml/setup-ocaml#839.

Draft PR to check that it all works and creates correct cache keys.

@edwintorok
Copy link
Contributor Author

Ah no Python2 in ubuntu-24.04, will have to wait with that one until feature/py3 gets merged, lets fix just the cache keys for now.

To better share caches with the main run.

Once `feature/py3` is merged, we can move all this to 24.04.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
@edwintorok edwintorok force-pushed the master branch 5 times, most recently from f8bc317 to f327f73 Compare August 5, 2024 13:53
@edwintorok
Copy link
Contributor Author

The part after v3- is still empty, seems to be quite difficult to get the OS version there.

@edwintorok edwintorok force-pushed the master branch 3 times, most recently from 4f3ac1b to 9efab52 Compare August 5, 2024 14:22
This is a bug in setup-ocaml@v3 ocaml/setup-ocaml#839

Work it around by defining our own cache prefix based on runner OS version.

Unfortunately the version itself doesn't seem to be available as a variable in GH actions.
There is 'runner.os', but that is just a generic Linux, there is 'matrix.os', but that is only present when using a matrix,
and there is '..container' which is only present when containers are used.

Use another GH action to determine the version, and now the cache-prefix looks like this:
```
cache-prefix: v3-Ubuntu-22.04
```

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
@edwintorok
Copy link
Contributor Author

I think I found a solution by using another GH action that makes the runner's OS version available, I couldn't find anything built-in to Github Actions contexts that would provide this information.

@edwintorok edwintorok marked this pull request as ready for review August 5, 2024 14:37
@edwintorok edwintorok merged commit 2097a16 into xapi-project:master Aug 5, 2024
15 checks passed
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.

4 participants