From 0c58bb66b69c431d685b201a56c1fcc7909f9044 Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Mon, 19 Feb 2024 13:57:55 +0000 Subject: [PATCH 1/2] integration-test: Fix build.rs output The cargo::warning seems to ignore output after a newline. Iterate over the entire rendered message and print it line-by-line. Signed-off-by: Dave Tucker --- test/integration-test/build.rs | 4 +++- xtask/src/run.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/integration-test/build.rs b/test/integration-test/build.rs index 1aee5fea..b7c44eb8 100644 --- a/test/integration-test/build.rs +++ b/test/integration-test/build.rs @@ -243,7 +243,9 @@ fn main() { } } 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) => { println!("cargo:warning={line}"); diff --git a/xtask/src/run.rs b/xtask/src/run.rs index 639f45e5..8bba7a53 100644 --- a/xtask/src/run.rs +++ b/xtask/src/run.rs @@ -86,7 +86,9 @@ where } } Message::CompilerMessage(CompilerMessage { message, .. }) => { - println!("{message}"); + for line in message.rendered.unwrap_or_default().split('\n') { + println!("cargo:warning={line}"); + } } Message::TextLine(line) => { println!("{line}"); From 6e9dcee70265385c5c828ced6caf131ab588784a Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Thu, 22 Feb 2024 12:26:23 +0000 Subject: [PATCH 2/2] ci: Use nightly-2022-02-12 on macOS LLVM-18 hasn't been released on macOS yet Signed-off-by: Dave Tucker --- .github/workflows/ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52ea04e5..b64146de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,12 +187,25 @@ jobs: with: submodules: recursive - - uses: dtolnay/rust-toolchain@master + - if: runner.os == 'Linux' + uses: dtolnay/rust-toolchain@master with: toolchain: nightly components: rust-src 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 - name: Install prerequisites @@ -244,7 +257,8 @@ jobs: - name: bpf-linker if: runner.os == 'macOS' # 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 if: runner.arch == 'ARM64'