diff options
author | Federico Mena Quintero <federico@gnome.org> | 2022-06-07 14:25:16 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2022-06-07 15:52:52 -0500 |
commit | cda6f02d716211ee61aaa8ed7e865df567d19147 (patch) | |
tree | 89cd1a0f27114f1461f62278cf239c004307f70d /ci | |
parent | ba479657440bed7d02b94f530e5e650154dedc7a (diff) | |
download | at-spi2-core-cda6f02d716211ee61aaa8ed7e865df567d19147.tar.gz |
Install Rust, so we can build grcov on our own
Diffstat (limited to 'ci')
-rw-r--r-- | ci/container_builds.yml | 2 | ||||
-rw-r--r-- | ci/env.sh | 2 | ||||
-rw-r--r-- | ci/install-rust.sh | 25 |
3 files changed, 29 insertions, 0 deletions
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 |