File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,11 +64,17 @@ jobs:
6464 if [ -z "$changed_files" ]; then
6565 projects=$(get_projects)
6666 else
67- projects=$(echo "$changed_files" | while read file; do dirname "$file" | grep anchor | sed 's#/anchor/.*#/anchor#g'; done | grep -vE "$ignore_pattern" | sort -u)
67+ # Only keep paths whose final segment is exactly "anchor" — otherwise
68+ # siblings like "anchor-example/" or nested "anchor-example/app/" leak in
69+ # and the build script tries to `pnpm install` in directories with no
70+ # package.json. See https://github.com/quiknode-labs/solana-program-examples
71+ # CI failure on PR #16.
72+ projects=$(echo "$changed_files" | while read file; do dirname "$file" | grep anchor | sed 's#/anchor/.*#/anchor#g'; done | awk -F/ '$NF == "anchor"' | grep -vE "$ignore_pattern" | sort -u)
6873 fi
6974 elif [[ "${{ steps.changes.outputs.anchor }}" == "true" ]]; then
7075 changed_files=(${{ steps.changes.outputs.anchor_files }})
71- projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep anchor | sed 's#/anchor/.*#/anchor#g'; done | grep -vE "$ignore_pattern" | sort -u)
76+ # Only keep paths whose final segment is exactly "anchor" — see comment above.
77+ projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep anchor | sed 's#/anchor/.*#/anchor#g'; done | awk -F/ '$NF == "anchor"' | grep -vE "$ignore_pattern" | sort -u)
7278 else
7379 projects=""
7480 fi
Original file line number Diff line number Diff line change @@ -64,11 +64,15 @@ jobs:
6464 if [ -z "$changed_files" ]; then
6565 projects=$(get_projects)
6666 else
67- projects=$(echo "$changed_files" | while read file; do dirname "$file" | grep native | sed 's#/native/.*#/native#g'; done | grep -vE "$ignore_pattern" | sort -u)
67+ # Only keep paths whose final segment is exactly "native" — otherwise
68+ # siblings like "alternative/" leak in and the build script tries to
69+ # `pnpm install` in directories with no package.json.
70+ projects=$(echo "$changed_files" | while read file; do dirname "$file" | grep native | sed 's#/native/.*#/native#g'; done | awk -F/ '$NF == "native"' | grep -vE "$ignore_pattern" | sort -u)
6871 fi
6972 elif [[ "${{ steps.changes.outputs.native }}" == "true" ]]; then
7073 changed_files=(${{ steps.changes.outputs.native_files }})
71- projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep native | sed 's#/native/.*#/native#g'; done | grep -vE "$ignore_pattern" | sort -u)
74+ # Only keep paths whose final segment is exactly "native" — see comment above.
75+ projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep native | sed 's#/native/.*#/native#g'; done | awk -F/ '$NF == "native"' | grep -vE "$ignore_pattern" | sort -u)
7276 else
7377 projects=""
7478 fi
Original file line number Diff line number Diff line change @@ -64,11 +64,15 @@ jobs:
6464 if [ -z "$changed_files" ]; then
6565 projects=$(get_projects)
6666 else
67- projects=$(echo "$changed_files" | while read file; do dirname "$file" | grep pinocchio | sed 's#/pinocchio/.*#/pinocchio#g'; done | grep -vE "$ignore_pattern" | sort -u)
67+ # Only keep paths whose final segment is exactly "pinocchio" — otherwise
68+ # siblings like "pinocchio-example/" would leak in and the build script
69+ # would try to `pnpm install` in directories with no package.json.
70+ projects=$(echo "$changed_files" | while read file; do dirname "$file" | grep pinocchio | sed 's#/pinocchio/.*#/pinocchio#g'; done | awk -F/ '$NF == "pinocchio"' | grep -vE "$ignore_pattern" | sort -u)
6871 fi
6972 elif [[ "${{ steps.changes.outputs.pinocchio }}" == "true" ]]; then
7073 changed_files=(${{ steps.changes.outputs.pinocchio_files }})
71- projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep pinocchio | sed 's#/pinocchio/.*#/pinocchio#g'; done | grep -vE "$ignore_pattern" | sort -u)
74+ # Only keep paths whose final segment is exactly "pinocchio" — see comment above.
75+ projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep pinocchio | sed 's#/pinocchio/.*#/pinocchio#g'; done | awk -F/ '$NF == "pinocchio"' | grep -vE "$ignore_pattern" | sort -u)
7276 else
7377 projects=""
7478 fi
Original file line number Diff line number Diff line change @@ -66,11 +66,15 @@ jobs:
6666 if [ -z "$changed_files" ]; then
6767 projects=$(get_projects)
6868 else
69- projects=$(echo "$changed_files" | while read file; do dirname "$file" | grep quasar | sed 's#/quasar/.*#/quasar#g'; done | grep -vE "$ignore_pattern" | sort -u)
69+ # Only keep paths whose final segment is exactly "quasar" — otherwise
70+ # siblings like "quasar-example/" would leak in and the build script
71+ # would try to `pnpm install` in directories with no package.json.
72+ projects=$(echo "$changed_files" | while read file; do dirname "$file" | grep quasar | sed 's#/quasar/.*#/quasar#g'; done | awk -F/ '$NF == "quasar"' | grep -vE "$ignore_pattern" | sort -u)
7073 fi
7174 elif [[ "${{ steps.changes.outputs.quasar }}" == "true" ]]; then
7275 changed_files=(${{ steps.changes.outputs.quasar_files }})
73- projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep quasar | sed 's#/quasar/.*#/quasar#g'; done | grep -vE "$ignore_pattern" | sort -u)
76+ # Only keep paths whose final segment is exactly "quasar" — see comment above.
77+ projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep quasar | sed 's#/quasar/.*#/quasar#g'; done | awk -F/ '$NF == "quasar"' | grep -vE "$ignore_pattern" | sort -u)
7478 else
7579 projects=""
7680 fi
Original file line number Diff line number Diff line change 5353 projects=$(get_projects)
5454 elif [[ "${{ steps.changes.outputs.asm }}" == "true" ]]; then
5555 changed_files=(${{ steps.changes.outputs.asm_files }})
56- projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep asm | sed 's#/asm/.*#/asm#g'; done | grep -vE "$ignore_pattern" | sort -u)
56+ # Only keep paths whose final segment is exactly "asm" — otherwise
57+ # anything containing the substring "asm" (e.g. "wasm/", "plasma/") would
58+ # leak in and the build script would try to test directories with no
59+ # ASM project. Match the get_projects() behaviour above.
60+ projects=$(for file in "${changed_files[@]}"; do dirname "${file}" | grep asm | sed 's#/asm/.*#/asm#g'; done | awk -F/ '$NF == "asm"' | grep -vE "$ignore_pattern" | sort -u)
5761 else
5862 projects=""
5963 fi
You can’t perform that action at this time.
0 commit comments