Skip to content

Commit

Permalink
Faster build in codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
cheina97 committed Nov 27, 2023
1 parent 984922a commit 4869ce2
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,19 @@ jobs:

- name: Build Application
run: |
find ./cmd -name "main.go" -exec dirname {} \; | while read dir; do
echo "Building ${dir}"
go build ${dir}
pids=()
while read dir; do
go build ${dir} &
pid=$!
pids+=("$pid")
echo "Building ${dir} with pid ${pid}"
done <<< "$(find ./cmd -name "main.go" -exec dirname {} \;)"
for pid in "${pids[@]}"; do
echo "Waiting for ${pid}"
wait $pid
done
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
Expand Down

0 comments on commit 4869ce2

Please sign in to comment.