From 592241c743d4f7f7c9ec065f422a3ccf5e2068d4 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Wed, 15 Jun 2022 17:47:12 +0200 Subject: [PATCH] chore: updated CI config & PKGBUILDs to new module split --- .woodpecker/.build.yml | 13 +++++++++++-- PKGBUILD | 8 ++++++++ PKGBUILD.dev | 8 ++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.woodpecker/.build.yml b/.woodpecker/.build.yml index b0fd267..d073b6c 100644 --- a/.woodpecker/.build.yml +++ b/.woodpecker/.build.yml @@ -6,10 +6,19 @@ matrix: platform: ${PLATFORM} pipeline: - debug: + install-modules: image: 'chewingbever/vlang:latest' pull: true commands: + - export VMODULES=$PWD/.vmodules + - 'cd src && v install' + when: + event: [pull_request] + + debug: + image: 'chewingbever/vlang:latest' + commands: + - export VMODULES=$PWD/.vmodules - make when: event: [pull_request] @@ -18,10 +27,10 @@ pipeline: prod: image: 'chewingbever/vlang:latest' - pull: true environment: - LDFLAGS=-lz -lbz2 -llzma -lexpat -lzstd -llz4 -lsqlite3 -static commands: + - export VMODULES=$PWD/.vmodules # Apparently this -D is *very* important - CFLAGS='-DGC_THREADS=1' make prod # Make sure the binary is actually statically built diff --git a/PKGBUILD b/PKGBUILD index 639ce95..33faec5 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -14,7 +14,15 @@ license=('AGPL3') source=("$pkgname::git+https://git.rustybever.be/vieter/vieter#tag=${pkgver//_/-}") md5sums=('SKIP') +prepare() { + export VMODULES="$srcdir/.vmodules" + + cd "$pkgname/src" && v install +} + build() { + export VMODULES="$srcdir/.vmodules" + cd "$pkgname" make prod diff --git a/PKGBUILD.dev b/PKGBUILD.dev index d25abb3..bff1459 100644 --- a/PKGBUILD.dev +++ b/PKGBUILD.dev @@ -22,7 +22,15 @@ pkgver() { git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } +prepare() { + export VMODULES="$srcdir/.vmodules" + + cd "$pkgname/src" && v install +} + build() { + export VMODULES="$srcdir/.vmodules" + cd "$pkgname" make prod