Quellcode durchsuchen

chore(ci): fix bpf-linker link failure on macos

Force bpf-linker to always be rebuilt/relinked. Before this change we
were always installing latest llvm from brew, but not always rebuilding
bpf-linker, which could lead to:

Run cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git --rev 821f92990074cb7e950e25129dcd55e20424cede --no-default-features
    Updating git repository `https://github.com/aya-rs/bpf-linker.git`
     Ignored package `bpf-linker v0.9.10 (https://github.com/aya-rs/bpf-linker.git?rev=821f92990074cb7e950e25129dcd55e20424cede#821f9299)` is already installed, use --force to override

And then:

warning: integration-test@0.1.0: error: linking with `bpf-linker` failed: signal: 6 (SIGABRT)
warning: integration-test@0.1.0:   = note: dyld[17642]: Library not loaded: '/usr/local/opt/z3/lib/libz3.4.12.dylib'
warning: integration-test@0.1.0:             Referenced from: '/Users/runner/.cargo/bin/bpf-linker'
Alessandro Decina vor 11 Monaten
Ursprung
Commit
f089a37626
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. 3 2
      .github/workflows/ci.yml

+ 3 - 2
.github/workflows/ci.yml

@@ -256,9 +256,10 @@ jobs:
 
       - name: bpf-linker
         if: runner.os == 'macOS'
-        # NB: rustc doesn't ship libLLVM.so on macOS, so disable proxying (default feature).
+        # NB: rustc doesn't ship libLLVM.so on macOS, so disable proxying (default feature). We also
+        # --force so that bpf-linker gets always relinked against the latest LLVM installed by brew.
         # Remove --rev when LLVM18 is released.
-        run: cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git --rev 821f92990074cb7e950e25129dcd55e20424cede --no-default-features
+        run: cargo install --force bpf-linker --git https://github.com/aya-rs/bpf-linker.git --rev 821f92990074cb7e950e25129dcd55e20424cede --no-default-features
 
       - name: Download debian kernels
         if: runner.arch == 'ARM64'