gitlab-ci: enable crossbuild only on user repo
This commit is contained in:
parent
54864f7743
commit
400f30213a
1 changed files with 7 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
|||
set -eu -o pipefail
|
||||
|
||||
readonly APORTSDIR=$CI_PROJECT_DIR
|
||||
readonly REPOS="cross backports user"
|
||||
readonly REPOS="cross backports user testing community"
|
||||
readonly ALPINE_REPOS="main community testing"
|
||||
readonly ARCH=$(apk --print-arch)
|
||||
# gitlab variables
|
||||
|
@ -93,6 +93,11 @@ check_aport() {
|
|||
local repo="$1" aport="$2"
|
||||
cd "$APORTSDIR/$repo/$aport"
|
||||
export CHOST=$CI_ALPINE_TARGET_ARCH
|
||||
# TODO: this enables crossbuild only on user, this should be cleaner
|
||||
if [ "$repo" != "user" ] && [ "$CI_ALPINE_TARGET_ARCH" != "$ARCH" ]; then
|
||||
aport_na="$aport_na $repo/$aport"
|
||||
return 1
|
||||
fi
|
||||
if ! abuild check_arch 2>/dev/null; then
|
||||
aport_na="$aport_na $repo/$aport"
|
||||
return 1
|
||||
|
@ -262,7 +267,7 @@ for ok in $aport_ok; do
|
|||
done
|
||||
|
||||
for na in $aport_na; do
|
||||
msg "$na: disabled for $ARCH" yellow
|
||||
msg "$na: disabled for $CI_ALPINE_TARGET_ARCH" yellow
|
||||
done
|
||||
|
||||
for ng in $aport_ng; do
|
||||
|
|
Loading…
Reference in a new issue