diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc20089..95bc2f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,14 +11,24 @@ stages: variables: 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 .fedora: variables: FDO_DISTRIBUTION_VERSION: "35" # 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: extends: @@ -28,10 +38,6 @@ build-fedora-container: variables: # clang-devel: required by rust bindgen FDO_DISTRIBUTION_PACKAGES: >- - rust - cargo - rustfmt - clippy gtk4-devel clang-devel gstreamer1-devel @@ -44,7 +50,9 @@ build-fedora-container: python3-setuptools util-linux xorg-x11-server-Xvfb + wget FDO_DISTRIBUTION_EXEC: >- + ci/install-rust.sh stable && pip3 install meson rustfmt-clippy: @@ -99,7 +107,7 @@ dist-package: - ninja -C build dist flatpak: - image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:41" + image: $GNOME_RUNTIME_IMAGE stage: release only: - flatpak diff --git a/ci/env.sh b/ci/env.sh new file mode 100644 index 0000000..42aec84 --- /dev/null +++ b/ci/env.sh @@ -0,0 +1,3 @@ +export RUSTUP_HOME='/usr/local/rustup' +export PATH=$PATH:/usr/local/cargo/bin +export CARGO_HOME='/usr/local/cargo' \ No newline at end of file diff --git a/ci/install-rust.sh b/ci/install-rust.sh new file mode 100755 index 0000000..ec53d1b --- /dev/null +++ b/ci/install-rust.sh @@ -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