add neovim nightly cronjob
Build/Publish XBPS / build-and-publish (push) Has been cancelled Details
Build/Publish neovim-nightly / build-and-publish (push) Has been cancelled Details

This commit is contained in:
Luca Bilke 2024-04-06 21:27:53 +02:00
parent 30e4a7d71b
commit d0af9d8b07
No known key found for this signature in database
GPG Key ID: AD6630D0A1E650AC
2 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,79 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build/Publish neovim-nightly
on:
schedule:
- cron: "0 7 * * *"
push:
branches:
- "main"
paths:
- ".forgejo/workflows/neovim-nightly.yml"
jobs:
build-and-publish:
runs-on: "docker"
container: "git.snaile.de/snailed/xbps-builder:2024.47.128"
env:
MAINTAINER: "Luca Bilke <luca@bil.ke>"
ARCH: "x86_64"
LICENSE: "Apache-2.0, Vim"
SHORT_DESCRIPTION: "Nightly build of Neovim"
DEPENDS: "LuaJIT>=2.0.0_1 glibc>=2.38_1 libluv>=1.30.1.0_1 libtermkey>=0.17_1 libuv>=1.0.0_1 libvterm>=0.3_1 msgpack>=1.1.0_1 tree-sitter>=0.19.0_1 unibilium>=2.0.0_1"
ALTERNATIVES: "vi:vi:/usr/bin/nvim vi:vi.1:/usr/share/man/man1/nvim.1 vi:view:/usr/bin/nvim vi:view.1:/usr/share/man/man1/nvim.1 vim:vim:/usr/bin/nvim vim:vim.1:/usr/share/man/man1/nvim.1"
SHLIB_REQUIRES: "libc.so.6 libluajit-5.1.so.2 libluv.so.1 libm.so.6 libmsgpackc.so.2 libtermkey.so.1 libtree-sitter.so.0 libunibilium.so.4 libuv.so.1 libvterm.so.0"
PROVIDES: "neovim-0.10.0_1"
REPLACES: "neovim>=0"
NAME: "neovim-nightly"
steps:
- name: Generate tag and package name
run: |
set -xeu
MAJOR=$(date +%Y)
MINOR=$(date +%m%d)
PATCH=$(date +%H%M)
echo "PACKAGE_NAME=${{ env.NAME }}-${MAJOR}.${MINOR}.${PATCH}_1" >> $GITHUB_ENV
- name: "Get code"
run: |
set -xeu
curl -L -o nightly.zip https://github.com/neovim/neovim/archive/refs/tags/nightly.zip
unzip nightly.zip
- name: "Build"
run: |
set -xeu
cd neovim-nightly || exit 1
mkdir /pkg
make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_LIBDIR=lib CMAKE_INSTALL_PREFIX=/pkg/usr CMAKE_EXTRA_FLAGS='-DCMAKE_INSTALL_LIBDIR=lib'
make install
- name: "Create package"
run: |
set -xeu
export XBPS_TARGET_ARCH=${{ env.ARCH }}
mkdir /target
cd /target || exit 1
xbps-create -A ${{ env.ARCH }} \
-H "${{ github.server_url }}/${{ github.repository }}" \
-l "${{ env.LICENSE }}" \
-n "${{ env.PACKAGE_NAME }}" \
-m "${{ env.MAINTAINER }}" \
-s "${{ env.SHORT_DESCRIPTION }}" \
-D "${{ env.DEPENDENCIES }}" \
-R "${{ env.REPLACES }}" \
-P "${{ env.PROVIDES }}" \
--shlib-requires "${{ env.SHLIB_REQUIRES }}" \
--alternatives "${{ env.ALTERNATIVES }}" \
"/pkg"
- name: Push Package
run: |
set -xeu
curl -so "/target/${{ env.ARCH }}-repodata" "https://xbps.snaile.de/${{ env.ARCH }}-repodata"
xbps-rindex --add "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps"
echo '${{ secrets.XBPS_SIGNING_KEY }}' >/tmp/privkey.pem
XBPS_PASSPHRASE=${{ secrets.XBPS_SIGNING_PASSPHRASE }} xbps-rindex --privkey /tmp/privkey.pem --sign-pkg --signedby "${{ env.MAINTAINER }}" "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps"
rm /tmp/privkey.pem
ls -lAH /target
find /target -type f -exec sh -c 'curl -X PUT --digest -u "${{ vars.XBPS_WEBDAV_USER }}:${{ secrets.XBPS_WEBDAV_KEY }}" -T "${1}" "https://xbps.snaile.de/$(basename $1)"' find-shell {} \;

View File

@ -12,6 +12,8 @@ go_import_path=github.com/mickael-menu/zk
go_build_tags=fts5
build_style=go
# Trigger build
pre_fetch() {
if ! cd "$XBPS_SRCDISTDIR"; then
msg_error "$pkgver: cannot change dir to $XBPS_BUILDDIR!\n"