.gitlab-ci.yml: Install Rust and cargo
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Mon, 3 May 2021 20:33:12 +0000 (22:33 +0200)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 4 May 2021 19:18:22 +0000 (20:18 +0100)
Unfortunately, Rust 1.41 (as available in Debian 10) is too old for
object v0.23.0, a dependency of maturin:

error[E0658]: subslice patterns are unstable
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/mod.rs:162:41
    |
162 |             [0x7f, b'E', b'L', b'F', 1, ..] => FileKind::Elf32,
    |                                         ^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/62254

... so we have to resort to rustup.

.gitlab-ci.yml

index 5708880eba427fc9c14fe22f572fffc1221185ba..039871955f8cbe390d122c60af40865c0377b016 100644 (file)
@@ -21,13 +21,15 @@ build:
             python3-setuptools python3-wheel pkg-config tcl-dev
             libreadline-dev bison flex libffi-dev ccache python3-venv
             binutils-powerpc64-linux-gnu binutils-powerpc64le-linux-gnu
-            autoconf gperf libgmp-dev libmpfr-dev libssl-dev
+            autoconf gperf libgmp-dev libmpfr-dev libssl-dev curl
         - export PATH="/usr/lib/ccache:$PATH"
         - export CCACHE_BASEDIR="$PWD"
         - export CCACHE_DIR="$PWD/ccache"
         - export CCACHE_COMPILERCHECK=content
         - ccache --zero-stats || true
         - ccache --show-stats || true
+        - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
+        - source $HOME/.cargo/env
     after_script:
         - export CCACHE_DIR="$PWD/ccache"
         - ccache --show-stats