aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/cargo/APKBUILD23
1 files changed, 19 insertions, 4 deletions
diff --git a/testing/cargo/APKBUILD b/testing/cargo/APKBUILD
index b8b980953d..284f7feb1f 100644
--- a/testing/cargo/APKBUILD
+++ b/testing/cargo/APKBUILD
@@ -24,6 +24,11 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/rust-lang/$pkgname/archive/$
cargo-$_bootstrap_gitrev-$_ctarget.tar.gz::https://s3.amazonaws.com/rust-lang-ci/cargo-builds/$_bootstrap_gitrev/cargo-nightly-$_ctarget.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
+_bootstrap_cargo="$srcdir/cargo-nightly-$_ctarget/cargo/bin/cargo"
+
+export CARGOFLAGS="--locked"
+export CARGO_HOME="$srcdir/.cargo"
+
prepare() {
default_prepare
cd "$builddir"
@@ -38,16 +43,26 @@ build() {
./configure \
--prefix=/usr \
--release-channel=stable \
- --cargo="$srcdir/cargo-nightly-$_ctarget/cargo/bin/cargo"
+ --cargo="$_bootstrap_cargo"
# LIBGIT2... Convince libgit2-sys to use the distro libgit2.
- make CARGOFLAGS="--locked" \
- CARGO_HOME="$srcdir/.cargo" \
- LIBGIT2_SYS_USE_PKG_CONFIG=1 \
+ make LIBGIT2_SYS_USE_PKG_CONFIG=1 \
RUSTFLAGS="-C target-feature=-crt-static" \
VERBOSE=1
}
+check() {
+ cd "$builddir"
+
+ ./target/$_ctarget/release/cargo --version
+
+ # XXX: ignore test failures for now
+ CARGO_HOME="$srcdir/.cargo" \
+ CFG_DISABLE_CROSS_TESTS=1 \
+ RUSTFLAGS="-C target-feature=-crt-static" \
+ "$_bootstrap_cargo" test --release --target "$_ctarget" || true
+}
+
package() {
cd "$builddir"