Skip to content

Commit 55f7771

Browse files
committed
ci: Make sure aya repository clone is not nested inside bpf-linker
Cargo searches for `.cargo` directories recursively in all parent directories. Therefore, nesting different Rust projects with their own `.cargo/config.toml` files in the same hierarchy (one nested in another) causes cargo to read and merge both configurations. To avoid that, clone both repositories in separate directories inside the workspace.
1 parent e504028 commit 55f7771

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ jobs:
4848
build:
4949
# We don't use ubuntu-latest because we care about the apt packages available.
5050
runs-on: ubuntu-22.04
51+
# We work with two git repositories in this workflow:
52+
#
53+
# - bpf-linker
54+
# - aya (for integration tests)
55+
#
56+
# Cargo searches for `.cargo` directories recursively in all parent
57+
# directories. Therefore, nesting different Rust projects with their own
58+
# `.cargo/config.toml` files in the same hierarchy (one nested in another)
59+
# causes cargo to read and merge both configurations.
60+
#
61+
# To avoid that, we clone both repositories in separate directories inside
62+
# the workspace.
63+
defaults:
64+
run:
65+
working-directory: bpf-linker
5166
strategy:
5267
fail-fast: false
5368
matrix:
@@ -78,6 +93,8 @@ jobs:
7893

7994
steps:
8095
- uses: actions/checkout@v6
96+
with:
97+
path: bpf-linker
8198

8299
- name: Install Rust ${{ matrix.toolchain.rust }}
83100
uses: dtolnay/rust-toolchain@master

0 commit comments

Comments
 (0)