From 22c8165e42e965c1b6585b69235386fb6ee68b9d Mon Sep 17 00:00:00 2001
From: Elliu <elliu@hashi.re>
Date: Wed, 15 Feb 2023 23:10:10 +0100
Subject: [PATCH] Update runners

---
 .gitlab-ci.yml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 08be6e96..a33e9c4b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,19 +13,19 @@
             - $CI_COMMIT_TITLE        =~ /.*\[wip\].*/
             - $CI_COMMIT_TITLE        =~ /.*\[no-build\].*/
             - $CI_COMMIT_TITLE        =~ /.*\[NO-BUILD\].*/
+    # Rust crates compiling can be quite hungry for disk space
+    # Launch the build one by one to limit the risk of consuming all the disk space
+    resource_group: rust_build
     before_script:
         - lsb_release -a
-        - echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
+        - echo -e "[profile.release]\nopt-level = 0" >> "$CARGO_HOME/config.toml"
         - apt update && apt -y install make libmpv-dev cmake clang clang-format gcc g++ xxd mkvtoolnix
             libcurl4-openssl-dev libsqlite3-dev manpages man-db libfontconfig-dev
             qt6-base-dev qt6-declarative-dev qt6-multimedia-dev
-        - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
-        - chmod +x ./rustup.sh
-        - ./rustup.sh -y --default-toolchain beta
-        - source $HOME/.cargo/env
-        - $HOME/.cargo/bin/cargo install diesel_cli --no-default-features --features sqlite
+        - cargo --version
+        - cargo install diesel_cli --no-default-features --features sqlite
     script:
-        - cmake -Bbuild -DCMAKE_RUST_COMPILER=$HOME/.cargo/bin/cargo -DCMAKE_C_COMPILER=${c_compiler} -DCMAKE_CXX_COMPILER=${cxx_compiler} && make -Cbuild
+        - cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${c_compiler} -DCMAKE_CXX_COMPILER=${cxx_compiler} && make -Cbuild
 
 variables:
     GIT_DEPTH: 3 # No need to clone all the history
-- 
GitLab