Use Debian experimental in CI to match LLVM between rustc and clang 2020-05-sample-c-bindings
authorMatt Corallo <git@bluematt.me>
Fri, 21 Aug 2020 23:05:27 +0000 (19:05 -0400)
committerMatt Corallo <git@bluematt.me>
Fri, 11 Sep 2020 02:03:32 +0000 (22:03 -0400)
.github/workflows/build.yml

index 7339536f7ee482a386ec06b6048a3803ab6e3034..a7a62041745992f48cf506faa43ac0b385f16a8d 100644 (file)
@@ -111,12 +111,17 @@ jobs:
     runs-on: ubuntu-latest
     # Ubuntu's version of rustc uses its own LLVM instead of being a real native package.
     # This leaves us with an incompatible LLVM version when linking. Instead, use a real OS.
-    container: debian:testing
+    # We further (temporarily) use Debian experimental since testing links rustc against the
+    # brand-new llvm-10, but clang/llvm still default to LLVM 9.
+    container: debian:experimental
     env:
       TOOLCHAIN: stable
     steps:
       - name: Install native Rust toolchain, Valgrind, and build utilitis
         run: |
+          echo 'Package: llvm llvm-runtime clang lld' > /etc/apt/preferences.d/99-llvm10
+          echo 'Pin: release n=experimental' >> /etc/apt/preferences.d/99-llvm10
+          echo 'Pin-Priority: 995' >> /etc/apt/preferences.d/99-llvm10
           apt-get update
           apt-get -y dist-upgrade
           apt-get -y install cargo valgrind lld git g++ clang