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

Include github actions runs-on field in key. #45

Open
rukai opened this issue Feb 9, 2022 · 3 comments
Open

Include github actions runs-on field in key. #45

rukai opened this issue Feb 9, 2022 · 3 comments

Comments

@rukai
Copy link
Contributor

rukai commented Feb 9, 2022

I just hit a confusing compilation issue when downgrading from runs-on: ubuntu-20.04 to runs-on: ubuntu-18.04 caused because the cache didnt clear.
I'm not sure if you have access to this field, maybe something similar could be done by looking at something like lsb_release -a

@jessestricker
Copy link

I am not sure if this is related, but I get this error on my workflow:

error: failed to select a version for the requirement `clap = "=4.0.15"`
candidate versions found which didn't match: 3.2.22, 3.2.21, 3.2.20, ...
location searched: crates.io index

I run the job with the following matrix:

rust-version: ["1.56", stable]
runner: [ubuntu-latest, macos-latest]

Locally, building works with both versions with a clean cache.

@rukai
Copy link
Contributor Author

rukai commented Oct 17, 2022

I think that is unrelated to this issue, your issue is to do with dependency resolution while this issue is caused by different versions of ubuntu having different versions of external c/c++ dependencies.

I suspect the difference in behavior you are experiencing is due to your local Cargo.lock file.
Try deleting that and seeing if you can reproduce the problem locally that way.
I'm just guessing from the error message, but if you have set clap = "=4.0.15" that can cause all sorts of problems with dependency resolution and you would be better off specifying it as just clap = "4.0.15".

@jessestricker
Copy link

Thanks for your suggestions.

I suspect the difference in behavior you are experiencing is due to your local Cargo.lock file.
Try deleting that and seeing if you can reproduce the problem locally that way.

I have the same Cargo.lock file committed to the repo for reproducibility, so it should work in both CI and local. Also I run cargo with the --locked flag in CI.

you would be better off specifying it as just clap = "4.0.15"

I do actually specify the dependency as clap = { version = "4.0.15", features = ["derive"] }. I suspect the constrain on =4.0.15 is because that's the version in the Cargo.lock file as well.

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