mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-11-21 16:41:03 +00:00
ci: install rust via rustup
Use stable version of rust
This commit is contained in:
parent
1fe43d7da3
commit
b5ec5b2d84
3 changed files with 43 additions and 7 deletions
|
@ -11,14 +11,24 @@ stages:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
FDO_UPSTREAM_REPO: "dabrain34/GstPipelineStudio"
|
FDO_UPSTREAM_REPO: "dabrain34/GstPipelineStudio"
|
||||||
GNOME_RUNTIME_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.38"
|
GNOME_RUNTIME_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:41"
|
||||||
|
|
||||||
# Version and tag for our current container
|
# Version and tag for our current container
|
||||||
.fedora:
|
.fedora:
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: "35"
|
FDO_DISTRIBUTION_VERSION: "35"
|
||||||
# Update this to trigger a container rebuild
|
# Update this to trigger a container rebuild
|
||||||
FDO_DISTRIBUTION_TAG: "2022-01-27.2"
|
FDO_DISTRIBUTION_TAG: "2022-03-07.3"
|
||||||
|
before_script:
|
||||||
|
- source ./ci/env.sh
|
||||||
|
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
|
||||||
|
# If cargo exists assume we probably will want to update
|
||||||
|
# the lockfile
|
||||||
|
#- |
|
||||||
|
# if command -v cargo; then
|
||||||
|
# cargo generate-lockfile --color=always
|
||||||
|
# cargo update --color=always
|
||||||
|
# fi
|
||||||
|
|
||||||
build-fedora-container:
|
build-fedora-container:
|
||||||
extends:
|
extends:
|
||||||
|
@ -28,10 +38,6 @@ build-fedora-container:
|
||||||
variables:
|
variables:
|
||||||
# clang-devel: required by rust bindgen
|
# clang-devel: required by rust bindgen
|
||||||
FDO_DISTRIBUTION_PACKAGES: >-
|
FDO_DISTRIBUTION_PACKAGES: >-
|
||||||
rust
|
|
||||||
cargo
|
|
||||||
rustfmt
|
|
||||||
clippy
|
|
||||||
gtk4-devel
|
gtk4-devel
|
||||||
clang-devel
|
clang-devel
|
||||||
gstreamer1-devel
|
gstreamer1-devel
|
||||||
|
@ -44,7 +50,9 @@ build-fedora-container:
|
||||||
python3-setuptools
|
python3-setuptools
|
||||||
util-linux
|
util-linux
|
||||||
xorg-x11-server-Xvfb
|
xorg-x11-server-Xvfb
|
||||||
|
wget
|
||||||
FDO_DISTRIBUTION_EXEC: >-
|
FDO_DISTRIBUTION_EXEC: >-
|
||||||
|
ci/install-rust.sh stable &&
|
||||||
pip3 install meson
|
pip3 install meson
|
||||||
|
|
||||||
rustfmt-clippy:
|
rustfmt-clippy:
|
||||||
|
@ -99,7 +107,7 @@ dist-package:
|
||||||
- ninja -C build dist
|
- ninja -C build dist
|
||||||
|
|
||||||
flatpak:
|
flatpak:
|
||||||
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:41"
|
image: $GNOME_RUNTIME_IMAGE
|
||||||
stage: release
|
stage: release
|
||||||
only:
|
only:
|
||||||
- flatpak
|
- flatpak
|
||||||
|
|
3
ci/env.sh
Normal file
3
ci/env.sh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export RUSTUP_HOME='/usr/local/rustup'
|
||||||
|
export PATH=$PATH:/usr/local/cargo/bin
|
||||||
|
export CARGO_HOME='/usr/local/cargo'
|
25
ci/install-rust.sh
Executable file
25
ci/install-rust.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
source ./ci/env.sh
|
||||||
|
|
||||||
|
RUSTUP_VERSION=1.23.1
|
||||||
|
RUST_VERSION=$1
|
||||||
|
RUST_ARCH="x86_64-unknown-linux-gnu"
|
||||||
|
|
||||||
|
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-audit
|
||||||
|
cargo install --force cargo-outdated
|
||||||
|
|
||||||
|
# fetch project deps
|
||||||
|
cargo fetch
|
Loading…
Reference in a new issue