~xdavidwu/aurbuild

e02366bfed1b1721396b5667babc53897b6c1582 — xdavidwu 2 years ago
initial commit
62 files changed, 77 insertions(+), 0 deletions(-)

A .gitignore
A abduco-git/.gitkeep
A alpine-apk-tools/.gitkeep
A amfora-git/.gitkeep
A android-aarch64-boost/.gitkeep
A android-aarch64-libiconv/.gitkeep
A android-aarch64-openssl/.gitkeep
A android-cmake/.gitkeep
A android-configure/.gitkeep
A android-environment/.gitkeep
A android-ndk/.gitkeep
A android-pkg-config/.gitkeep
A android-platform-28/.gitkeep
A android-platform-29/.gitkeep
A android-platform-30/.gitkeep
A android-platform/.gitkeep
A android-sdk-build-tools-28.0.3/.gitkeep
A android-sdk-build-tools-29.0.1/.gitkeep
A android-sdk-build-tools-29.0.2/.gitkeep
A android-sdk-build-tools-30.0.2/.gitkeep
A android-sdk-build-tools-30/.gitkeep
A android-sdk-build-tools-31.0.0/.gitkeep
A android-sdk-build-tools/.gitkeep
A android-sdk-cmdline-tools-latest/.gitkeep
A android-sdk-platform-tools/.gitkeep
A android-sdk/.gitkeep
A android-x86-64-boost/.gitkeep
A android-x86-64-libiconv/.gitkeep
A android-x86-64-openssl/.gitkeep
A build.yml
A drawio-desktop/.gitkeep
A dvtm-git/.gitkeep
A fcitx5-breeze/.gitkeep
A freefilesync-bin/.gitkeep
A gitkraken/.gitkeep
A intel-ipsec-mb/.gitkeep
A j4-dmenu-desktop/.gitkeep
A jdk-openj9-bin/.gitkeep
A kaniko/.gitkeep
A kubelogin/.gitkeep
A libinput-gestures/.gitkeep
A megatools/.gitkeep
A minecraft-launcher/.gitkeep
A multimc5/.gitkeep
A ncpamixer/.gitkeep
A noto-fonts-cjk-vf/.gitkeep
A noto-fonts-vf/.gitkeep
A onlyoffice-bin/.gitkeep
A pacman-screen-nosuid-hook/.gitkeep
A pikaur/.gitkeep
A ppsspp-git/.gitkeep
A slack-desktop/.gitkeep
A stress-ng/.gitkeep
A systemd-cron/.gitkeep
A tar-libarchive/.gitkeep
A teams/.gitkeep
A terminus-font-ll2-td1/.gitkeep
A update
A vim-ale-git/.gitkeep
A visual-studio-code-bin/.gitkeep
A vmtouch/.gitkeep
A zoom/.gitkeep
A  => .gitignore +1 -0
@@ 1,1 @@
version

A  => abduco-git/.gitkeep +0 -0
A  => alpine-apk-tools/.gitkeep +0 -0
A  => amfora-git/.gitkeep +0 -0
A  => android-aarch64-boost/.gitkeep +0 -0
A  => android-aarch64-libiconv/.gitkeep +0 -0
A  => android-aarch64-openssl/.gitkeep +0 -0
A  => android-cmake/.gitkeep +0 -0
A  => android-configure/.gitkeep +0 -0
A  => android-environment/.gitkeep +0 -0
A  => android-ndk/.gitkeep +0 -0
A  => android-pkg-config/.gitkeep +0 -0
A  => android-platform-28/.gitkeep +0 -0
A  => android-platform-29/.gitkeep +0 -0
A  => android-platform-30/.gitkeep +0 -0
A  => android-platform/.gitkeep +0 -0
A  => android-sdk-build-tools-28.0.3/.gitkeep +0 -0
A  => android-sdk-build-tools-29.0.1/.gitkeep +0 -0
A  => android-sdk-build-tools-29.0.2/.gitkeep +0 -0
A  => android-sdk-build-tools-30.0.2/.gitkeep +0 -0
A  => android-sdk-build-tools-30/.gitkeep +0 -0
A  => android-sdk-build-tools-31.0.0/.gitkeep +0 -0
A  => android-sdk-build-tools/.gitkeep +0 -0
A  => android-sdk-cmdline-tools-latest/.gitkeep +0 -0
A  => android-sdk-platform-tools/.gitkeep +0 -0
A  => android-sdk/.gitkeep +0 -0
A  => android-x86-64-boost/.gitkeep +0 -0
A  => android-x86-64-libiconv/.gitkeep +0 -0
A  => android-x86-64-openssl/.gitkeep +0 -0
A  => build.yml +39 -0
@@ 1,39 @@
image: archlinux
repositories:
  aurbuild: >
    https://aurbuild.xdavidwu.link/#F73F137D4573DEFAA097DBF09544CFF6B08A3FD3
  # hackish, key seems mandatory
  multilib: >
    https://asia.mirror.pkgbuild.com/multilib/os/x86_64/#F73F137D4573DEFAA097DBF09544CFF6B08A3FD3
packages:
  - base-devel
secrets:
  - 3eb89d61-a73d-48dd-81cf-54c7bd006028
sources:
environment:
tasks:
  - prepare: |
      sudo sed "s/MAKEFLAGS=\"\"/MAKEFLAGS=\"-j$(nproc)\"/;s/COMPRESSZST=(zstd -c -z -q -)/COMPRESSZST=(zstd -c -z -T$TCOUNT -q -19 -)/" -i /etc/makepkg.conf
      echo 'PACKAGER="aurbuild <aurbuild@builds.xdavidwu.link>"' | sudo tee -a /etc/makepkg.conf
      cd "$pkgbase"
      source PKGBUILD
      printf "Key-Type: RSA\nKey-Length: 4096\nKey-Usage: sign\nName-Real: aurbuild AUTOMATED key for lsign\nName-Email: aurbuild@localhost\nExpire-Date: 0\n%%no-protection\n%%commit\n" | gpg --gen-key --batch
      for i in $(seq 0 $((${#validpgpkeys[@]} - 1))); do
        gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys ${validpgpkeys[$i]}
        printf "y\ny\n" | gpg --command-fd 0 --batch --lsign-key ${validpgpkeys[$i]};
      done
      makepkg -so --noconfirm
  - build: |
      . /etc/profile
      cd "$pkgbase"
      makepkg -ce
  - deploy: |
      echo "StrictHostKeyChecking=no" >> ~/.ssh/config
      cd "$pkgbase"
      for i in *.pkg.tar.zst; do
        ssh deploy@aurbuild.xdavidwu.link "$i" < "$i"
      done
triggers:
  - action: email
    condition: failure
    to: xdavidwuph@gmail.com

A  => drawio-desktop/.gitkeep +0 -0
A  => dvtm-git/.gitkeep +0 -0
A  => fcitx5-breeze/.gitkeep +0 -0
A  => freefilesync-bin/.gitkeep +0 -0
A  => gitkraken/.gitkeep +0 -0
A  => intel-ipsec-mb/.gitkeep +0 -0
A  => j4-dmenu-desktop/.gitkeep +0 -0
A  => jdk-openj9-bin/.gitkeep +0 -0
A  => kaniko/.gitkeep +0 -0
A  => kubelogin/.gitkeep +0 -0
A  => libinput-gestures/.gitkeep +0 -0
A  => megatools/.gitkeep +0 -0
A  => minecraft-launcher/.gitkeep +0 -0
A  => multimc5/.gitkeep +0 -0
A  => ncpamixer/.gitkeep +0 -0
A  => noto-fonts-cjk-vf/.gitkeep +0 -0
A  => noto-fonts-vf/.gitkeep +0 -0
A  => onlyoffice-bin/.gitkeep +0 -0
A  => pacman-screen-nosuid-hook/.gitkeep +0 -0
A  => pikaur/.gitkeep +0 -0
A  => ppsspp-git/.gitkeep +0 -0
A  => slack-desktop/.gitkeep +0 -0
A  => stress-ng/.gitkeep +0 -0
A  => systemd-cron/.gitkeep +0 -0
A  => tar-libarchive/.gitkeep +0 -0
A  => teams/.gitkeep +0 -0
A  => terminus-font-ll2-td1/.gitkeep +0 -0
A  => update +37 -0
@@ 1,37 @@
#!/bin/sh

set -e

info=

fetch_info() {
	query=
	for i in *; do
		[ ! -d "$i" ] && continue
		query="${query}&arg[]=${i}"
	done
	info=$(curl -f "https://aur.archlinux.org/rpc/?v=5&type=info$query")
}
resolve_timestamp() {
	echo "$info" | jq -r ".results[] | select(.Name == \"$1\") | .LastModified"
}

dispatch() {
	yq ".sources += [\"https://aur.archlinux.org/$1.git\"] |
		.environment.pkgbase = \"$1\"
	" < build.yml | ssh builds@builds.xdavidwu.link "submit -n$1\ $2"
}

fetch_info

for i in *; do
	[ ! -d "$i" ] && continue
	echo "$i"
	version=$(cat "$i/version" || true)
	new_ver=$(resolve_timestamp "$i" "$branch" "$version")
	if [ "$version" != "$new_ver" ]; then
		echo "dispatch $i $new_ver"
		dispatch "$i" "$new_ver"
		echo "$new_ver" > "$i/version"
	fi
done

A  => vim-ale-git/.gitkeep +0 -0
A  => visual-studio-code-bin/.gitkeep +0 -0
A  => vmtouch/.gitkeep +0 -0
A  => zoom/.gitkeep +0 -0