Skip to content

Commit fc8e61b

Browse files
Merge pull request #1943 from kristof-mattei/speed-up-installing-cargo-edit
chore: cargo binstall defaults to cargo install when not found
2 parents ebd3b7c + 61cf619 commit fc8e61b

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,7 @@ jobs:
551551
- name: Install cargo-edit to do set-version, and cargo-get to get the description
552552
shell: bash
553553
run: |
554-
cargo install --locked cargo-edit
555-
556-
cargo binstall --no-confirm cargo-get
554+
cargo binstall --no-confirm cargo-edit cargo-get
557555
558556
- name: Set the Cargo.toml version before we copy in the data into the Docker container
559557
shell: bash

.github/workflows/publish-crate-after-release.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,31 @@ jobs:
7373
7474
cargo --version
7575
76+
- name: Get binstall
77+
shell: bash
78+
working-directory: /tmp
79+
run: |
80+
archive="cargo-binstall-x86_64-unknown-linux-musl.tgz"
81+
wget \
82+
--output-document=- \
83+
--timeout=10 \
84+
--waitretry=3 \
85+
--retry-connrefused \
86+
--progress=dot:mega \
87+
"https://github.com/cargo-bins/cargo-binstall/releases/latest/download/${archive}" \
88+
| tar \
89+
--directory=${HOME}/.cargo/bin/ \
90+
--strip-components=0 \
91+
--no-overwrite-dir \
92+
--extract \
93+
--verbose \
94+
--gunzip \
95+
--file=-
96+
7697
- name: Install cargo-edit to do set-version
7798
shell: bash
7899
run: |
79-
cargo install --locked cargo-edit
100+
cargo binstall --no-confirm cargo-edit
80101
81102
- name: Set version in Cargo.toml / Cargo.lock
82103
shell: bash

0 commit comments

Comments
 (0)