-
Notifications
You must be signed in to change notification settings - Fork 270
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
CI: test with commited lock files #632
Conversation
07c746f
to
4bc5aa1
Compare
|
4bc5aa1
to
61e2f69
Compare
@tcharding could you move the rename of the lockfiles to the first commit (you can do it in its own commit, or combine it, it just needs to be the first one). That would make my local CI easier to tweak. Then the WASM thing I think is about paths being somehow screwed up by the new script indirection. You can see that in the |
61e2f69
to
2e6b87a
Compare
The wasm thing was that now we run the ci script twice and in the wasm test we modify the toml file it was getting modified twice so had duplicate
I saw the "invalid table header" line and immediately focused on that, I rekon I did not even read the the next line, today I read the "duplicate key" line and realised the problem immediately. I'd hate to have to make life threatening decisions with this brain :) |
2e6b87a
to
c6b103a
Compare
Hit another issue with the |
On ice for another day. |
I'll spend a little bit of time seeing if I can get it to run inside nix, and if so, what's involved. But I think it's fine if we just can't test this stuff properly. |
I was able to get wasm-pack to work inside nix (sorta, because of rustwasm/wasm-pack#814 I've had to hack up some paths; and the unit tests aren't working because of "missing I think we should investigate further. |
oo https://rustwasm.github.io/wasm-pack/book/commands/build.html suggests we can add Edit: I'm unconvinced that But we could try |
Oh, I see, the issue is that cargo options are not actually passed to So indeed, wasm-pack is unconditionally running We should use |
I filed a bug at rustwasm/wasm-pack#1316. Meanwhile I think the workaround is easy: we copy the lockflies, run the |
Awesome, thanks for digging into it. I'll push it forward from here. |
ecb97c9
to
2420933
Compare
This needs rebasing on #641 to pass CI. |
2420933
to
07bb476
Compare
07bb476
to
2969f49
Compare
Rebase, no other changes. |
I don't think this PR actually uses the committed lockfiles anywhere :) |
2969f49
to
a493e00
Compare
Epic fail. I'm confident this was a rebase fail and not me being totally retarded. |
a493e00
to
f4078f8
Compare
then | ||
echo "Dependencies are up to date" | ||
else | ||
echo "::warning file=Cargo-recent.lock::Dependencies could be updated" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In f4078f8:
This warning is harmless enough, but "cargo update
yields later dependencies" is neither necessary nor sufficient for us to want to update Cargo-recent.lock. I expect this warning to literally always trigger because it finds later dependencies that are incompatible with our MSRV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only runs for "recent" but I agree, and thought at the time that we added it to rust-bitcoin
that it was not that useful. Didn't seem to hurt though, and since its informational I acked it. I'm happy to remove it everywhere but I'd prefer to wait till @Kixunil is back because he added it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to open the file in GH to see the warning so it at least won't be intrusive.
Could you re-order the first commit so that the "rename the lockfiles" commit comes first? It is much easier for me to handle PRs if every commit has the lockfiles in the same place. |
Can do, my bad - you asked that before once. |
A while back we added two lock files that were to track dependencies of two successful test runs, one with a minimal set of dependencies and one with a recent set of dependencies (ie, recent dependency versions). We never used these lock files in CI however. In preparation for using the lock files in CI, and in order to be uniform with `rust-bitcoin`, move the lock files to the crate root and rename them to: - Cargo-minimal.lock - Cargo-recent.lock
We would like to be able to run the test script with different lock files, in preparation for doing so move the `test.sh` script to `_test.sh` and add a new `test.sh` that runs `_test.sh`. Keep the outer script as `test.sh` so that we do not change the workflow for those running the script including the github actions.
The `wasm-pack` command does not honour `cargo` flags passed to it so we cannot use `--locked` and test against pre-made lock files. Instead just run the WASM test from the test script wrapper.
Update the CI scripts to use the minimal/recent lockfiles, requires using `--locked` for various `cargo` incantations.
f4078f8
to
3da39c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 3da39c6
A while back we added two lock files, one for testing with recent dependency versions and one for testing with minimal dependency versions but at the time we never used them in CI.
Move the two current lock files and use them in CI (mirroring what is done in
rust-bitcoin
).