mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-11 14:30:03 +00:00
Fix glibc detection on ubuntu 24.02 (#2143)
* Fix glibc detection on ubuntu 24.02 On ubuntu 24.02, glibc are installed in: ``` /usr/lib/aarch64-linux-gnu/libc.so.6 /usr/lib/aarch64-linux-gnu/libc.so ``` Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Add tests for ubuntu-24.02-arm Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix CI: Add detect-targets-ubuntu-arm-test Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Bump ubuntu-20.04 to ubuntu-22.04 Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Update outdated comment in detect-targets-ubuntu-arm-test in ci.yml Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
20e9b25913
commit
1394d1bbda
2 changed files with 24 additions and 3 deletions
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
|
@ -275,7 +275,23 @@ jobs:
|
||||||
--mount src="$PWD/.github/scripts/test-detect-targets-musl.sh",dst=/usr/local/bin/test.sh,type=bind \
|
--mount src="$PWD/.github/scripts/test-detect-targets-musl.sh",dst=/usr/local/bin/test.sh,type=bind \
|
||||||
alpine /bin/ash -c "apk update && apk add bash && test.sh x86_64-unknown-linux-musl"
|
alpine /bin/ash -c "apk update && apk add bash && test.sh x86_64-unknown-linux-musl"
|
||||||
|
|
||||||
detect-targets-ubuntu-test:
|
detect-targets-ubuntu-arm-test:
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
cache-all-crates: true
|
||||||
|
- name: Build and run detect-targets tests
|
||||||
|
run: |
|
||||||
|
set -euxo pipefail
|
||||||
|
output="$(cargo run --features cli-logging --bin detect-targets)"
|
||||||
|
[ "$output" = "$(printf 'aarch64-unknown-linux-gnu\naarch64-unknown-linux-musl')" ]
|
||||||
|
# Set working directory here, otherwise `cargo` would download
|
||||||
|
# and build quite a few unused dependencies.
|
||||||
|
working-directory: crates/detect-targets
|
||||||
|
|
||||||
|
detect-targets-ubuntu-x86_64-test:
|
||||||
needs:
|
needs:
|
||||||
- detect-targets-build
|
- detect-targets-build
|
||||||
- changed-files
|
- changed-files
|
||||||
|
@ -284,7 +300,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
- ubuntu-20.04
|
- ubuntu-22.04
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -385,7 +401,8 @@ jobs:
|
||||||
- release-dry-run
|
- release-dry-run
|
||||||
- detect-targets-build
|
- detect-targets-build
|
||||||
- detect-targets-alpine-test
|
- detect-targets-alpine-test
|
||||||
- detect-targets-ubuntu-test
|
- detect-targets-ubuntu-arm-test
|
||||||
|
- detect-targets-ubuntu-x86_64-test
|
||||||
- detect-targets-more-glibc-test
|
- detect-targets-more-glibc-test
|
||||||
- detect-targets-nix-test
|
- detect-targets-nix-test
|
||||||
- detect-targets-android-check
|
- detect-targets-android-check
|
||||||
|
|
|
@ -52,6 +52,10 @@ pub(super) async fn detect_targets(target: String) -> Vec<String> {
|
||||||
format!("/lib64/{dirname}/{filename}"),
|
format!("/lib64/{dirname}/{filename}"),
|
||||||
format!("/usr/lib/{dirname}/{filename}"),
|
format!("/usr/lib/{dirname}/{filename}"),
|
||||||
format!("/usr/lib64/{dirname}/{filename}"),
|
format!("/usr/lib64/{dirname}/{filename}"),
|
||||||
|
format!("/usr/lib/{dirname}/libc.so.6"),
|
||||||
|
format!("/usr/lib64/{dirname}/libc.so.6"),
|
||||||
|
format!("/usr/lib/{dirname}/libc.so"),
|
||||||
|
format!("/usr/lib64/{dirname}/libc.so"),
|
||||||
]
|
]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|p| AutoAbortHandle(tokio::spawn(is_gnu_ld(p))))
|
.map(|p| AutoAbortHandle(tokio::spawn(is_gnu_ld(p))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue