Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macOS CI #883

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 3 additions & 1 deletion test/integration-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
Expand Down
4 changes: 3 additions & 1 deletion xtask/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
Expand Down