From 980baacf6c941b293e6300cb0f8d0ae336bb8032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 19 Dec 2018 18:14:15 +0200 Subject: [PATCH] Add stable-armv7-unknown-linux-gnueabihf and stable-x86_64-pc-windows-gnu cross-builds --- .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1f8564ff0..36c93fa65 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,3 +95,31 @@ test nightly: image: "rustlang/rust:nightly-slim" allow_failure: true <<: *cargo_test + +.cargo_cross_check_template: &cargo_cross_check + # Stable img + # https://hub.docker.com/_/rust/ + image: "rust:slim" + stage: "test" + variables: + PKG_CONFIG: "true" + PKG_CONFIG_ALLOW_CROSS: "1" + + before_script: + - rustup target add $CROSS_TARGET_TRIPLET + - rustc --version + - cargo --version + + script: + - cargo check --target $CROSS_TARGET_TRIPLET --all --color=always + - cargo check --target $CROSS_TARGET_TRIPLET --all --all-features --color=always + +test stable-armv7-unknown-linux-gnueabihf: + extends: .cargo_cross_check_template + variables: + CROSS_TARGET_TRIPLET: "armv7-unknown-linux-gnueabihf" + +test stable-x86_64-pc-windows-gnu: + extends: .cargo_cross_check_template + variables: + CROSS_TARGET_TRIPLET: "x86_64-pc-windows-gnu"