cargo-binstall/crates/detect-targets
Jiahao XU 76a692224d
Fix detect-targets on Linux and add CI testing (#1344)
* Testing: Add `detect-targets/src/main.rs`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `detect-targets` linux: `guess_host_triple` could return wrong libc info

so it has to check it manually instead of simply providing alternatives
like other OSes.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `get_ld_flavor` for Alpine's gcompat glibc

Its output is different from regular glibc, so we need to hardcode that
particular cases.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix detection of alpine specific musl target

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add ci testing for Alpine

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add CI test for detect-targets on ubuntu

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor `get_ld_flavor`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix shellcheck

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add more CI test for ubuntu

and fixed typo in it

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Rm distro specific target as it breaks `cargo-install` fallback

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Make sure all binaries are built in CI

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add `package.metadata.binstall` for `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix justfile

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `detect-targets-{alpine, ubuntu}-test`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `detect-targets-ubuntu-test`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `debug-targets-ubuntu-test`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* `set -exuo pipefail` in `detect-targets-ubuntu-test`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Simplify `detect-targets-*-test`: Use `Swatinem/rust-cache@v2` directly

instead of using `just-setup`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Rm dup steps in `detect-targets-ubuntu-test`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add `ls` to detect-targets-alpine-test for debugging

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* FIx `detect-targets-alpine-test`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `get_ld_flavor`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `linux::detect_targets` on ubuntu & glibc system

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* FIx `linux::detect_targets` glibc checking

Check dynlib suffix

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-06 14:17:43 +00:00
..
src Fix detect-targets on Linux and add CI testing (#1344) 2023-09-06 14:17:43 +00:00
build.rs Optimize compilation time (#320) 2022-08-27 23:27:39 +12:00
Cargo.toml Fix detect-targets on Linux and add CI testing (#1344) 2023-09-06 14:17:43 +00:00
LICENSE-APACHE Refactor: Extract new crate detect-targets and improve code quality (#307) 2022-08-21 22:21:33 +10:00
LICENSE-MIT Refactor: Extract new crate detect-targets and improve code quality (#307) 2022-08-21 22:21:33 +10:00