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

Suggested Travis CI usage doesn't cache the build #143

Open
Nemo157 opened this issue Oct 4, 2019 · 4 comments
Open

Suggested Travis CI usage doesn't cache the build #143

Nemo157 opened this issue Oct 4, 2019 · 4 comments

Comments

@Nemo157
Copy link

Nemo157 commented Oct 4, 2019

Despite suggesting using cache: cargo to cache cargo-audit the script force-reinstalls it every time. Until -Z install-upgrade is stabilized I have been using a script like this for installing tools using the cache:

install:
- >
  [[ "$(wasm-bindgen --version)" == "wasm-bindgen 0.2.51" ]]
  || cargo install --force wasm-bindgen-cli --version 0.2.51

(I may open a PR to update this if I get around to setting up cargo-audit on any of my projects CI).

@tarcieri
Copy link
Member

tarcieri commented Oct 8, 2019

Good catch. I think ideally we could check what the current version of cargo-audit is via e.g. the crates.io API or local index, and only reinstall if there's a new version.

FWIW, I opened a rust-internals issue about the general problem: https://internals.rust-lang.org/t/idea-cargo-install-update/11072

@tarcieri
Copy link
Member

tarcieri commented Oct 8, 2019

Apparently there's a cargo install-update command on nightly:

rust-lang/cargo#6797

bors bot added a commit to nervosnetwork/ckb that referenced this issue Oct 10, 2019
1664: chore: update get_block_template rpc doc r=quake,u2,keroro520,yangby-cryptape a=shaojunda

replace difficulty with compact_target

1669: chore(test): Allow CI debug logs r=u2,zhangsoledad a=keroro520

The number of logs is acceptable after #1474. 

1671: test: disconnect check by all part r=u2,keroro520,quake a=driftluo

Disconnect check by all part

1673: docs: Update PoW mining algorithm description r=u2,quake a=ashchan

Now that this has been decided the doc should reflect that before the next round of mining test.

1680: fix: get_block_transactions_process r=u2,quake a=zhangsoledad



1689: chore: issuance comment r=u2,quake a=zhangsoledad

comments were lost on rebase

1690: ci: Make sure cargo-audit up-to-date r=quake,u2 a=zhangsoledad

rustsec/rustsec#143
https://internals.rust-lang.org/t/idea-cargo-install-update/11072
rust-lang/cargo#6797



1691: chore: speed up maturity test r=u2,quake a=zhangsoledad



Co-authored-by: shaojunda <shaojunda@gmail.com>
Co-authored-by: keroro520 <keroroxx520@gmail.com>
Co-authored-by: driftluo <driftluo@foxmail.com>
Co-authored-by: James Chen <james@ashchan.com>
Co-authored-by: zhangsoledad <787953403@qq.com>
bors bot added a commit to nervosnetwork/ckb that referenced this issue Oct 10, 2019
1680: fix: get_block_transactions_process r=u2,quake a=zhangsoledad



1689: chore: issuance comment r=u2,quake a=zhangsoledad

comments were lost on rebase

1690: ci: Make sure cargo-audit up-to-date r=quake,u2 a=zhangsoledad

rustsec/rustsec#143
https://internals.rust-lang.org/t/idea-cargo-install-update/11072
rust-lang/cargo#6797



1691: chore: speed up maturity test r=u2,quake a=zhangsoledad



1693: test: simple header field json format check r=quake,u2 a=zhangsoledad



1696: fix: set `next_epoch_diff` to one instead of panic when it is zero r=zhangsoledad,u2 a=doitian



Co-authored-by: zhangsoledad <787953403@qq.com>
Co-authored-by: ian <ian@nervos.org>
bors bot added a commit to nervosnetwork/ckb that referenced this issue Oct 10, 2019
1680: fix: get_block_transactions_process r=u2,quake a=zhangsoledad



1689: chore: issuance comment r=u2,quake a=zhangsoledad

comments were lost on rebase

1690: ci: Make sure cargo-audit up-to-date r=quake,u2 a=zhangsoledad

rustsec/rustsec#143
https://internals.rust-lang.org/t/idea-cargo-install-update/11072
rust-lang/cargo#6797



1691: chore: speed up maturity test r=u2,quake a=zhangsoledad



1693: test: simple header field json format check r=quake,u2 a=zhangsoledad



1696: fix: set `next_epoch_diff` to one instead of panic when it is zero r=zhangsoledad,u2 a=doitian



Co-authored-by: zhangsoledad <787953403@qq.com>
Co-authored-by: ian <ian@nervos.org>
@tarcieri
Copy link
Member

tarcieri commented Nov 4, 2019

Seems like cargo install-update will be stabilizing soon:

rust-lang/cargo#7560

When it does, we can update the documentation to use it.

@tjodden
Copy link
Contributor

tjodden commented Feb 6, 2020

The install-upgrade feature was stabilized in Cargo 1.41. However, it's not a new install-update command, but rather the install command will automatically upgrade the package, or do nothing if it is up-to-date:

$ cargo install cargo-audit
    Updating crates.io index
     Ignored package `cargo-audit v0.11.1` is already installed, use --force to override

However, with earlier versions the same command fails:

$ cargo +1.40.0 install cargo-audit
    Updating crates.io index
error: binary `cargo-audit` already exists in destination as part of `cargo-audit v0.11.1`

So the README would need some disclaimer about Rust version.

tarcieri added a commit that referenced this issue May 7, 2021
Update `cargo-lock` requirement from 3.0 to 4.0
tarcieri pushed a commit that referenced this issue May 7, 2021
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

3 participants