From 520b4843ff94d4c748bdb165981db08e15d56baa Mon Sep 17 00:00:00 2001 From: KenHV Date: Sun, 11 Dec 2022 15:12:38 +0530 Subject: [PATCH] Setup CI Signed-off-by: KenHV --- .cirrus.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ notes.md | 3 +++ 3 files changed, 53 insertions(+) create mode 100644 .cirrus.yml create mode 100644 notes.md diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 00000000000000..fa0734420f3f43 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,47 @@ +env: + CIRRUS_CLONE_DEPTH: "1" + GH_AUTH: "ENCRYPTED[!37f49a3c2ff53ae3cd6478518356b31d939652e0113563bc5eb7810872807212776b2a02c17c21f6228eb967162fb357!]" + +generic_task: + name: Generic build + timeout_in: 120m + container: + image: archlinux:base-devel + cpu: 8 + memory: 4G + setup_env_script: + - pacman -Syu --needed --noconfirm bc libelf pahole cpio perl tar xz + git zstd github-cli kmod + - gh auth login --with-token <<< "$GH_AUTH" + - sed -i '/E_ROOT/d' /usr/bin/makepkg + - sed -i "s/PKGEXT='.pkg.tar.xz'/PKGEXT='.pkg.tar.zst'/" /etc/makepkg.conf + - echo 'COMPRESSZST+=(--threads=0)' >> /etc/makepkg.conf + build_script: + - env ci=y makepkg -s --nodeps + release_script: + - VER=$(grep "VERSION =" Makefile | head -1 | sed "s/.*= //" ) + - PATCH=$(grep "PATCHLEVEL =" Makefile | head -1 | sed "s/.*= //") + - SUB=$(grep "SUBLEVEL =" Makefile | head -1 | sed "s/.*= //") + - TAG="${VER}.${PATCH}.${SUB}" + - TARGET="${VER}.${PATCH}" + - gh release create "${TAG}" *.pkg.tar.zst -t "${TAG}" -F notes.md --target "${TARGET}" + artifacts: + path: "*.pkg.tar.zst" + +athena_task: + name: Athena build + timeout_in: 120m + container: + image: archlinux:base-devel + cpu: 8 + memory: 4G + setup_env_script: + - pacman -Syu --needed --noconfirm bc libelf pahole cpio perl tar xz + git zstd kmod + - sed -i '/E_ROOT/d' /usr/bin/makepkg + - sed -i "s/PKGEXT='.pkg.tar.xz'/PKGEXT='.pkg.tar.zst'/" /etc/makepkg.conf + - echo 'COMPRESSZST+=(--threads=0)' >> /etc/makepkg.conf + build_script: + - env ci=y personal=y makepkg -s --nodeps + artifacts: + path: "*.pkg.tar.zst" diff --git a/.gitignore b/.gitignore index 265959544978a7..bf84df454c56c5 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,6 @@ x509.genkey # Documentation toolchain sphinx_*/ + +# CI +!.cirrus.yml diff --git a/notes.md b/notes.md new file mode 100644 index 00000000000000..c67aea5c10c03f --- /dev/null +++ b/notes.md @@ -0,0 +1,3 @@ +**Installation:** +Download linux-kensur and linux-kensur-headers packages and run +`sudo pacman -U linux-kensur-*`