From 8e7b95716468961baa5bab305032f750dbc32abb Mon Sep 17 00:00:00 2001 From: Aurel Canciu Date: Fri, 14 Jan 2022 13:14:44 +0100 Subject: [PATCH] Fix Archlinux PKGBUILD check() run on ARM The check() run started to fail after #2288 since ENVTEST_ARCH was not set correctly on ARM/ARM64. This should fix the problem for the flux-go and flux-scm AUR packages. Signed-off-by: Aurel Canciu --- .github/aur/flux-go/PKGBUILD.template | 10 +++++++++- .github/aur/flux-scm/PKGBUILD.template | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/aur/flux-go/PKGBUILD.template b/.github/aur/flux-go/PKGBUILD.template index b92e3a3d..225320da 100644 --- a/.github/aur/flux-go/PKGBUILD.template +++ b/.github/aur/flux-go/PKGBUILD.template @@ -30,12 +30,20 @@ build() { export CGO_CXXFLAGS="$CXXFLAGS" export CGO_CPPFLAGS="$CPPFLAGS" export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" - ./manifests/scripts/bundle.sh "${PWD}/manifests" "${PWD}/cmd/flux/manifests" + make cmd/flux/.manifests.done go build -ldflags "-linkmode=external -X main.VERSION=${pkgver}" -o ${_srcname} ./cmd/flux } check() { cd "flux2-${pkgver}" + case $CARCH in + aarch64) + export ENVTEST_ARCH=arm64 + ;; + armv6h|armv7h) + export ENVTEST_ARCH=arm + ;; + esac make test } diff --git a/.github/aur/flux-scm/PKGBUILD.template b/.github/aur/flux-scm/PKGBUILD.template index 049e8608..9593cf83 100644 --- a/.github/aur/flux-scm/PKGBUILD.template +++ b/.github/aur/flux-scm/PKGBUILD.template @@ -38,6 +38,14 @@ build() { check() { cd "flux2" + case $CARCH in + aarch64) + export ENVTEST_ARCH=arm64 + ;; + armv6h|armv7h) + export ENVTEST_ARCH=arm + ;; + esac make test }