Skip to content

Commit

Permalink
parallel build
Browse files Browse the repository at this point in the history
  • Loading branch information
pyama86 committed Apr 26, 2024
1 parent 4ff8bbf commit 6895ceb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,9 @@ deb: source_for_deb ## Packaging for DEB
version:
@git describe --tags --abbrev=0|sed -e 's/v//g' > version

SUPPORTOS=centos7 almalinux9 ubuntu20 ubuntu22 ubuntu24 debian10 debian11
pkg: version ## Create some distribution packages
rm -rf builds && mkdir builds
for i in $(SUPPORTOS); do \
docker-compose build nss_$$i || exit 1; \
docker-compose run --rm -v `pwd`:/stns nss_$$i || exit 1; \
done
rm -rf builds && mkdir build:
scripts/pkg.sh

changelog:
git-chglog -o CHANGELOG.md
Expand Down
19 changes: 19 additions & 0 deletions scripts/pkg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
pids=()
SUPPORTOS="centos7 almalinux9 ubuntu20 ubuntu22 ubuntu24 debian10 debian11"
rm -rf builds && mkdir builds
for i in $SUPPORTOS; do
{
docker-compose build nss_$i && docker-compose run --rm -v "$(pwd)":/stns nss_$i
} 2>&1 | tee builds/$i.log &

pids+=($!)
done

for pid in ${pids[@]}; do
wait $pid
if [ $? -ne 0 ]; then
exit 1
fi
done
rm -f builds/*log

0 comments on commit 6895ceb

Please sign in to comment.