Skip to content

Commit 9b1b920

Browse files
committed
cargo-binstall should be present in CI
1 parent 12bfa6b commit 9b1b920

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/run-dev-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ jobs:
4545
# run: vcpkg install openssl
4646

4747
- uses: cargo-bins/cargo-binstall@main
48-
env:
49-
CARGO_HOME: '~/.cargo'
5048

5149
- name: Install third-party binaries (HTML report generator)
5250
run: >-

noxfile.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
from os import environ
23
from pathlib import Path
34
import platform
45
import re
@@ -15,6 +16,7 @@
1516

1617
BIN_STALL_CARGO = re.compile(r"^([^\s]+)\s([^:]+):")
1718
CARGO_BINSTALL = "cargo-binstall"
19+
IS_CI = "CI" in environ
1820

1921

2022
class CargoInstaller:
@@ -30,8 +32,9 @@ def __init__(self, session: nox.Session):
3032
name, version = found.groups()
3133
cargo_bins.setdefault(name, version)
3234
self.cargo_bins = cargo_bins
33-
for dep, ver in cargo_bins.items():
34-
ci_logger.info("Found %s: %s" % (dep, ver))
35+
if IS_CI:
36+
for dep, ver in cargo_bins.items():
37+
ci_logger.info("Found %s: %s" % (dep, ver))
3538
self.cargo_install_cmd: tuple[str, ...] = ("cargo", "install")
3639

3740
installed_path = Path("~/.cargo/bin")
@@ -45,7 +48,7 @@ def __init__(self, session: nox.Session):
4548
/ (CARGO_BINSTALL + "" if platform.system() != "Windows" else ".exe")
4649
).exists():
4750
ci_logger.info("Found %s" % CARGO_BINSTALL)
48-
else:
51+
elif not IS_CI:
4952
ci_logger.info("Installing %s" % CARGO_BINSTALL)
5053
match platform.system():
5154
case "Windows":

0 commit comments

Comments
 (0)