From dfad0e6622a4ada6f44bbafd2bbfa6bccb976d2f Mon Sep 17 00:00:00 2001 From: ChengyuZhu6 Date: Fri, 17 Nov 2023 14:12:25 +0800 Subject: [PATCH] .github: fix the failure without devicemapper for host sharing fix error when running checks and tests: error: failed to run custom build command for `devicemapper-sys v0.1.5` fatal error: 'libdevmapper.h' file not found thread 'main' panicked at 'Could not generate dm.h bindings: ClangDiagnostic("dm.h:2:10: fatal error: 'libdevmapper.h' file not found\n")', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/devicemapper-sys-0.1.5/build.rs:24:10 stack backtrace: 0: rust_begin_unwind at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5 1: core::panicking::panic_fmt at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14 2: core::result::unwrap_failed at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:1651:5 3: core::result::Result::expect 4: build_script_build::main 5: core::ops::function::FnOnce::call_once note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. warning: build failed, waiting for other jobs to finish... make: *** [../../utils.mk:177: standard_rust_check] Error 101 Signed-off-by: ChengyuZhu6 --- .github/workflows/static-checks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/static-checks.yaml b/.github/workflows/static-checks.yaml index 4303f9581f..e278a2dfc7 100644 --- a/.github/workflows/static-checks.yaml +++ b/.github/workflows/static-checks.yaml @@ -98,6 +98,9 @@ jobs: - name: Install musl-tools if: ${{ matrix.component != 'runtime' }} run: sudo apt-get -y install musl-tools + - name: Install devicemapper + if: ${{ matrix.command == 'make check' && matrix.component == 'agent' }} + run: sudo apt-get -y install libdevmapper-dev - name: Install libseccomp if: ${{ matrix.command != 'make vendor' && matrix.command != 'make check' && matrix.install-libseccomp == 'yes' }} run: |