Skip to content

Commit

Permalink
Merge pull request #2296 from fluxcd/fix-pkgbuild-envtest
Browse files Browse the repository at this point in the history
Fix Archlinux PKGBUILD check() run on ARM
  • Loading branch information
relu authored Jan 14, 2022
2 parents 8f93e2a + 8e7b957 commit 677dca0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/aur/flux-go/PKGBUILD.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 8 additions & 0 deletions .github/aur/flux-scm/PKGBUILD.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 677dca0

Please sign in to comment.