From 4b78bdf3767915e2ca298802435ae348c9bbb129 Mon Sep 17 00:00:00 2001 From: Will Speak Date: Sat, 15 Aug 2020 16:09:50 +0100 Subject: [PATCH] Use LLVM 9 in CI * Trying to pin the LLVM Version to LLVM 9 * Install LLVM@9 from Brew * Pin the brew version too. * Update macOS Build Image * Dump Toolchain Version on Build Get version information for `clang` and `rustc`. Clang is used for linking so knwing the LLVM Version it is using is useful. * Update Ubuntu Base Box * Ubuntu 20 * Add LLVM 9 to Path on Linux --- .ci/Dockerfile | 12 ++++++------ .ci/buildbase-pipelines.yaml | 4 ++-- .ci/llvm.list | 12 ------------ azure-pipelines.yaml | 10 ++++++---- build.sh | 6 ++++++ 5 files changed, 20 insertions(+), 24 deletions(-) delete mode 100644 .ci/llvm.list diff --git a/.ci/Dockerfile b/.ci/Dockerfile index 8671d371..88970e9d 100644 --- a/.ci/Dockerfile +++ b/.ci/Dockerfile @@ -1,11 +1,11 @@ -FROM ubuntu:18.04 -RUN apt-get update && \ - apt-get install -y curl gnupg2 && \ - curl -sS https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - -COPY llvm.list /etc/apt/sources.list.d/ +FROM ubuntu:20.04 RUN apt-get update && \ + apt-get install -y wget curl gnupg2 lsb-release software-properties-common && \ + curl -O https://apt.llvm.org/llvm.sh && \ + chmod +x llvm.sh && \ + ./llvm.sh 9 && \ apt-get install -y sudo && \ apt-get install -y python3 && \ - apt-get install -y clang binutils && \ apt-get install -y llvm-9-dev && \ + apt-get install -y clang binutils && \ apt-get install -y zlib1g-dev diff --git a/.ci/buildbase-pipelines.yaml b/.ci/buildbase-pipelines.yaml index a4db4bd2..72ab71c6 100644 --- a/.ci/buildbase-pipelines.yaml +++ b/.ci/buildbase-pipelines.yaml @@ -3,7 +3,7 @@ pool: trigger: paths: - include: + include: - '.ci' variables: @@ -17,4 +17,4 @@ steps: docker push $(dockerId)/$(imageName) workingDirectory: .ci env: - pswd: $(dockerPassword) + pswd: $(dockerPassword) diff --git a/.ci/llvm.list b/.ci/llvm.list deleted file mode 100644 index abfa3366..00000000 --- a/.ci/llvm.list +++ /dev/null @@ -1,12 +0,0 @@ -# # i386 not available -# deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main -# deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main -# # 7 -# deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main -# deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main -# 8 -deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main -deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main -# 9 -deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main -deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3c6414e9..639a809d 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -7,16 +7,17 @@ resources: jobs: - job: macOS pool: - vmImage: 'macOS-10.14' + vmImage: 'macOS-10.15' steps: - - script: 'brew install llvm' + - script: 'brew install llvm\@9' displayName: Brew install LLVM - script: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh && sh rustup.sh -y" displayName: Rustup - script: | export PATH=/usr/local/bin:$PATH # Local bin (brew) source ~/.cargo/env - export LLVM_SYS_90_PREFIX=/usr/local/opt/llvm + export LLVM_SYS_90_PREFIX=/usr/local/opt/llvm\@9 + export LLVM_CONFIG_PATH=${LLVM_SYS_90_PREFIX}/bin/llvm-config cargo install just ./build.sh test displayName: './build.sh test' @@ -33,8 +34,9 @@ jobs: displayName: Rustup - script: | source ~/.cargo/env - export PATH=${PATH}:~/.local/bin/ + export PATH=${PATH}:~/.local/bin/:/usr/lib/llvm-9/bin export LLVM_SYS_90_PREFIX=/usr/lib/llvm-9 + export LLVM_CONFIG_PATH=${LLVM_SYS_90_PREFIX}/bin/llvm-config cargo install just ./build.sh test displayName: './build.sh test' diff --git a/build.sh b/build.sh index d99be3a6..93647f3a 100755 --- a/build.sh +++ b/build.sh @@ -11,4 +11,10 @@ function check_for() check_for python3 +echo "Clang version:" +clang --version + +echo "Rust version" +rustc --version + just "$@"