From 4abe3cd15562773c9005b8f075d2d511898bc7db Mon Sep 17 00:00:00 2001 From: Tobias Manske Date: Mon, 21 Aug 2023 14:54:26 +0200 Subject: [PATCH] Use ninja --- entrypoint.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index bd646dd..1efa372 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -eEu -set -v +[[ ${DEBUG:-} == "true" ]] && set -eEu +[[ ${DEBUG:-} == "true" ]] && set -v PIPELINE_ID=$RANDOM echo ${PIPELINE_ID} @@ -11,7 +11,7 @@ sudo pacman-key --init ## Needed so pacman doesnt complain. repo-add "/repo/${AUR_REPO_NAME}.db.tar.xz" -sudo pacman -Syu --noconfirm minio-client pacman-contrib &>/dev/null # Setup tooling +sudo pacman -Syu --noconfirm minio-client pacman-contrib ninja &>/dev/null # Setup tooling mcli alias set s3 https://s3.tobiasmanske.de "${REPO_ACCESS_KEY}" "${REPO_SECRET_KEY}" @@ -26,6 +26,8 @@ while [[ "${LOCK}" != "${PIPELINE_ID}" ]]; do LOCK=$(mcli cat s3/repo/LOCK) if [[ "${LOCK}" == "FREE" ]]; then echo $PIPELINE_ID | mcli pipe s3/repo/LOCK + LOCK=$(mcli cat s3/repo/LOCK) + continue fi echo "Waiting for lock with id $PIPELINE_ID..." sleep $((RANDOM % 10)) @@ -67,6 +69,7 @@ echo "C3FE87CFB8F8D503AE03EC1C033E7F3DC71FE89E:6:" | gpg --import-ownertrust --b sudo pacman --noconfirm -Syu archlinux-keyring &>/dev/null git clone --recursive https://git.tobiasmanske.de/archlinux-repo/package_sources.git packages &>/dev/null + cd packages touch buildqueue @@ -113,10 +116,6 @@ done queue grep validpgpkeys buildfile | cut -d "=" -f2 | tr -d " " | xargs -n1 gpg --recv-keys cat graph -echo -echo QUEUE -echo -cat queue if [[ ${DEBUG:-} == "true" ]]; then echo "Debug mode, not building anything." @@ -130,7 +129,11 @@ fi ## BUILD -aur build -S --noconfirm -a queue --no-sync --margs -s +# aur build -S --noconfirm -a queue --no-sync --margs -s +export AUR_SYNC_USE_NINJA=1 +cat graph | aur sync--ninja --keep-going=0 -S -- makepkg -sir | ninja -f /dev/stdin +echo "##################################" +ls -la /repo ## Upload to repo mcli mirror --overwrite /repo s3/repo/x86_64