Merge pull request #883 from dave-tucker/libelf

Fix macOS CI
pull/882/head
Dave Tucker 9 months ago committed by GitHub
commit 664bb47abf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -187,12 +187,25 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@master - if: runner.os == 'Linux'
uses: dtolnay/rust-toolchain@master
with: with:
toolchain: nightly toolchain: nightly
components: rust-src components: rust-src
targets: aarch64-unknown-linux-musl,x86_64-unknown-linux-musl targets: aarch64-unknown-linux-musl,x86_64-unknown-linux-musl
#### Temporary workaround for LLVM 18 not being released yet.
- if: runner.os == 'macOS'
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-02-12
components: rust-src
targets: aarch64-unknown-linux-musl,x86_64-unknown-linux-musl
- if: runner.os == 'macOS'
run: sed -i '' 's/nightly/nightly-2024-02-12/' test/integration-ebpf/rust-toolchain.toml
#### End of temporary workaround.
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Install prerequisites - name: Install prerequisites
@ -244,7 +257,8 @@ jobs:
- name: bpf-linker - name: bpf-linker
if: runner.os == 'macOS' 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).
run: cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git --no-default-features # 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
- name: Download debian kernels - name: Download debian kernels
if: runner.arch == 'ARM64' if: runner.arch == 'ARM64'

@ -243,7 +243,9 @@ fn main() {
} }
} }
Message::CompilerMessage(CompilerMessage { message, .. }) => { Message::CompilerMessage(CompilerMessage { message, .. }) => {
println!("cargo:warning={message}"); for line in message.rendered.unwrap_or_default().split('\n') {
println!("cargo:warning={line}");
}
} }
Message::TextLine(line) => { Message::TextLine(line) => {
println!("cargo:warning={line}"); println!("cargo:warning={line}");

@ -86,7 +86,9 @@ where
} }
} }
Message::CompilerMessage(CompilerMessage { message, .. }) => { Message::CompilerMessage(CompilerMessage { message, .. }) => {
println!("{message}"); for line in message.rendered.unwrap_or_default().split('\n') {
println!("cargo:warning={line}");
}
} }
Message::TextLine(line) => { Message::TextLine(line) => {
println!("{line}"); println!("{line}");

Loading…
Cancel
Save