[at-spi2-core: 2/5] Install Rust, so we can build grcov on our own
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core: 2/5] Install Rust, so we can build grcov on our own
- Date: Wed, 8 Jun 2022 00:41:58 +0000 (UTC)
commit cda6f02d716211ee61aaa8ed7e865df567d19147
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jun 7 14:25:16 2022 -0500
Install Rust, so we can build grcov on our own
ci/container_builds.yml | 2 ++
ci/env.sh | 2 ++
ci/install-rust.sh | 25 +++++++++++++++++++++++++
3 files changed, 29 insertions(+)
---
diff --git a/ci/container_builds.yml b/ci/container_builds.yml
index 94f768db..56809854 100644
--- a/ci/container_builds.yml
+++ b/ci/container_builds.yml
@@ -14,6 +14,7 @@ variables:
# When branching change the suffix to avoid conflicts with images
# from the master branch
BASE_TAG: "2022-06-03.0-master"
+ RUST_STABLE: "1.58.1"
.container.opensuse@x86_64:
stage: "container-build"
@@ -28,6 +29,7 @@ variables:
libxkbcommon-devel libXi-devel libXtst-devel lcov meson ninja
python38 python38-gobject tar wget
FDO_DISTRIBUTION_EXEC: >-
+ bash ci/install-rust.sh ${RUST_STABLE} x86_64-unknown-linux-gnu &&
bash ci/install-grcov.sh
opensuse-container@x86_64:
diff --git a/ci/env.sh b/ci/env.sh
new file mode 100644
index 00000000..6f47f12e
--- /dev/null
+++ b/ci/env.sh
@@ -0,0 +1,2 @@
+export RUSTUP_HOME='/usr/local/rustup'
+export PATH=$PATH:/usr/local/cargo/bin
\ No newline at end of file
diff --git a/ci/install-rust.sh b/ci/install-rust.sh
new file mode 100644
index 00000000..6e9dd379
--- /dev/null
+++ b/ci/install-rust.sh
@@ -0,0 +1,25 @@
+source ./ci/env.sh
+
+set -eu
+export CARGO_HOME='/usr/local/cargo'
+
+RUSTUP_VERSION=1.24.3
+RUST_VERSION=$1
+RUST_ARCH=$2
+
+RUSTUP_URL=https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/$RUST_ARCH/rustup-init
+wget $RUSTUP_URL
+
+chmod +x rustup-init;
+./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION;
+rm rustup-init;
+chmod -R a+w $RUSTUP_HOME $CARGO_HOME
+
+rustup --version
+cargo --version
+rustc --version
+
+rustup component add clippy-preview
+rustup component add rustfmt
+# cargo install --force cargo-c
+cargo install --version ^1.0 gitlab_clippy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]