gstreamer/ci/scripts/install-rust.sh
Jordan Petridis 472d1b52d3 ci: Add a simple build job based on debian
The gstreamer-rs repos use debian based images already,
which we can later base on this one. Additionally it's
good to have another distro target so we avoid weird
fedoraisms when possible.

It will also be simpler to keep it up to date, as we
don't need to run the test suite against this build as
well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6656>
2024-04-24 15:01:27 +00:00

26 lines
612 B
Bash

#! /bin/bash
set -eux
# Install Rust
RUSTUP_VERSION=1.27.0
RUST_VERSION=1.77.2
RUST_ARCH="x86_64-unknown-linux-gnu"
RUSTUP_URL=https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/$RUST_ARCH/rustup-init
curl -o rustup-init $RUSTUP_URL
export RUSTUP_HOME="/usr/local/rustup"
export CARGO_HOME="/usr/local/cargo"
export PATH="/usr/local/cargo/bin:$PATH"
chmod +x rustup-init;
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION;
rm rustup-init;
chmod -R a+w $RUSTUP_HOME $CARGO_HOME
cargo install cargo-c --version 0.9.31+cargo-0.78.0
rustup --version
cargo --version
rustc --version