* Fix integration test: Make sure `cargo build cargo-binstall` would not fail due to binary already present
* Disable feature `zlib-ng` for release build
* Disable build-std for release build on aarch64-unknown-linux-gnu
* Fix clippy warning in unit test CI
* Fix compile-settings.jq
* Fix caching: Rm `restores-keys`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Run `$CARGO -vV` in `detect-targets` if env `CARGO` present
* Improve crate doc for `detect-targets`
* Use env var `CARGO` in `install_from_source` if present
* Test use of `CARGO` env in `tests.sh`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Make binaries with `required-features` optional so that crates like `sccache` would work as expected.
* Fix `infer_bin_dir_template`: concat with `data.bin_path` introduced in #417
* Always `chmod +x $bin` on unix in case the archive (e.g. `sccache`) did not set the executable bit of fmt == Bin.
* CI: Install `sccache` but do not run it since it requires cargo env to be ready
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add new field `gh_crate_meta::Context::archive_suffix`
* Support `archive_suffix = ""` for unix
* Use `archive-suffix` in `FULL_FILENAMES` & `NOVERSION_FILENAMES` to support `PkgFmt::Bin`
* Simplify `PkgFmt::extensions`
* Fix `default_bin_dir_template` in `infer_bin_dir_template`: Fix typo `archive_suffix`
* Test `default_bin_dir_template` in CI
* Fix installation of `PkgFmt::Bin`: `chmod +x $bin` on unix if fmt == Bin
* Add miniserve to `.github/scripts/tests.sh`
* Update `SUPPORT.md`
* Add github-test-Cargo2.toml to test Github pkg-url with bin-dir provided
* Avoid allocation on processing `path_normalized` in `BinFile::from_product`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
From @passcod :
* Make bin-dir an Option
* Use cargo-release as a test case
* WIP: Try multiple default bin dirs
* Update bins.rs
* Update cargo_toml_binstall.rs
From @NobodyXu :
* Optimize & Prepare for support multi `bin-path`s
* Ensure quickinstall bin_dir work as usual.
* Rm dup entries in `FULL_FILENAMES`
* Add second version of `NOVERSION_FILENAMES`
* Impl multiple default `bin-dir`s
* Improve doc for `BinFile::from_product`
* Fix tests.sh
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
* Fix `cargo_toml`: Bump dep to v0.12.1
* Test `cargo-watch` in CI
* Fix `*-test-Cargo.toml` used in integration tests
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add new feature `log_release_max_level_debug`
* Fix calculation of `log_level` in `logging`
* Enable feature log_release_max_level_debug on CI release build
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
but explicitly enable it in our own builds.
This is because using zlib-ng sometimes does not compile easily on Windows,
and using the pure miniz_oxide offers a better install story from source.
For our binary builds, we can provide the optimal performance, and still
do that for most users as they will update with cargo-binstall, getting our
build as a second pass.
* Test default `pkt-url` for GitLab and BitBucket
* Fail if `cargo-build` is called when testing GitLab/BitBucket
* Fix use of `remote_exists` in `GhCrateMeta::launch_baseline_find_tasks`
If `Method::HEAD` fails, try `Method::GET` since some servers reject
`Method::HEAD`, e.g. bbuseruploads.s3.amazonaws.com
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add new feature `trust-dns` to lib & bin
* Enable `trust-dns` feature by default
Because the `getaddrinfo` is a poorly designed API.
* USe default feature set on windows CI
because wintls on the CI does not support TLS 1.3 and trust-dns only
support dns over https if rustls is used.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Derive `Eq` for `PkgFmt`, `PkgFmtDecomposed` & `TarBasedFmt`
* Derive `Eq` for `PkgMeta`, `PkgOverride` & `BinMeta`
* Rm unnecessary reborrow in `install_from_source`
* Rm unnecessary `into()` in `args::parse`
* Fix `clippy` warning in `CratesToml::append_to_path`
* Fix clippy warning in `cratesio_url`
* Fix clippy warning in `detect_targets_linux`
* Add `clippy` and `rustfmt` to workflow `unit-test`
Because `clippy` would not check inactive code disabled by `cfg`, so we
have to also run `clippy` on multiple targets.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>