Skip to content

Commit 47a09a4

Browse files
authored
Merge pull request #761 from aya-rs/mac-broken-qemu
Fix macOS CI
2 parents 1d5f764 + 756e6b9 commit 47a09a4

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -188,24 +188,28 @@ jobs:
188188

189189
- name: Install prerequisites
190190
if: runner.os == 'macOS'
191+
# The xargs shipped on macOS always exits 0 with -P0, so we need GNU findutils.
192+
#
193+
# The tar shipped on macOS doesn't support --wildcards, so we need GNU tar.
194+
#
191195
# The clang shipped on macOS doesn't support BPF, so we need LLVM from brew.
192196
#
193197
# We also need LLVM for bpf-linker, see comment below.
194198
run: |
195199
set -euxo pipefail
196-
brew install findutils qemu dpkg pkg-config llvm
200+
brew update
201+
brew install dpkg findutils gnu-tar llvm pkg-config
202+
# Workaround for https://github.com/Homebrew/homebrew-core/pull/139492.
203+
brew reinstall qemu
204+
echo /usr/local/opt/findutils/libexec/gnubin >> $GITHUB_PATH
205+
echo /usr/local/opt/gnu-tar/libexec/gnubin >> $GITHUB_PATH
197206
echo /usr/local/opt/llvm/bin >> $GITHUB_PATH
198207
199208
- name: bpf-linker
200209
if: runner.os == 'macOS'
201210
# NB: rustc doesn't ship libLLVM.so on macOS, so disable proxying (default feature).
202211
run: cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git --no-default-features
203212

204-
- name: Alias gxargs as xargs
205-
if: runner.os == 'macOS'
206-
# macOS xargs always exits 0 with -P0.
207-
run: mkdir xargs-is-gxargs && ln -s "$(which gxargs)" xargs-is-gxargs/xargs && echo "$PWD"/xargs-is-gxargs >> $GITHUB_PATH
208-
209213
- name: Download debian kernels
210214
if: runner.arch == 'ARM64'
211215
run: |
@@ -232,11 +236,6 @@ jobs:
232236
linux-image-6.4.0-2-cloud-amd64-unsigned_6.4.4-3_amd64.deb \
233237
| xargs -0 -t -P0 -I {} wget -nd -nv -P test/.tmp/debian-kernels/amd64 ftp://ftp.us.debian.org/debian/pool/main/l/linux/{}
234238
235-
- name: Alias gtar as tar
236-
if: runner.os == 'macOS'
237-
# macOS tar doesn't support --wildcards which we use below.
238-
run: mkdir tar-is-gtar && ln -s "$(which gtar)" tar-is-gtar/tar && echo "$PWD"/tar-is-gtar >> $GITHUB_PATH
239-
240239
- name: Extract debian kernels
241240
run: |
242241
set -euxo pipefail

0 commit comments

Comments
 (0)