File tree Expand file tree Collapse file tree 1 file changed +22
-15
lines changed Expand file tree Collapse file tree 1 file changed +22
-15
lines changed Original file line number Diff line number Diff line change @@ -79,23 +79,30 @@ jobs:
79
79
"tokens/token-2022/transfer-hook/anchor/TransferHookTransferCost"
80
80
"tokens/token-2022/transfer-hook/anchor/TransferHookWhitelist"
81
81
)
82
+ declare -a pids=()
83
+ declare -a failed_builds=()
84
+
82
85
for projectDir in "${ProjectDirs[@]}"; do
83
- echo "
84
- ********
85
- Building $projectDir
86
- ********"
87
- cd $projectDir
88
- if anchor build; then
89
- echo "Build succeeded for $projectDir."
90
- else
91
- failed=true
92
- failed_builds+=($projectDir)
93
- echo "Build failed for $projectDir. Continuing with the next program."
94
- fi
95
- cd - > /dev/null
86
+ (
87
+ echo "******** Building $projectDir ********"
88
+ cd $projectDir
89
+ if anchor build; then
90
+ echo "Build succeeded for $projectDir."
91
+ else
92
+ echo "Build failed for $projectDir."
93
+ # Capture the directory of failed build
94
+ failed_builds+=("$projectDir")
95
+ fi
96
+ ) &
97
+ pids+=($!)
96
98
done
97
- if [ "$failed" = true ]; then
98
- echo "Programs that failed building:"
99
+
100
+ for pid in "${pids[@]}"; do
101
+ wait $pid
102
+ done
103
+
104
+ if [ ${#failed_builds[@]} -ne 0 ]; then
105
+ echo "Some builds failed:"
99
106
printf "%s\n" "${failed_builds[@]}"
100
107
exit 1
101
108
else
You can’t perform that action at this time.
0 commit comments