From 61a4658350ebb25d405ee18e4a6f288357e4418e Mon Sep 17 00:00:00 2001 From: Elliott Slaughter Date: Mon, 12 Jul 2021 14:30:40 -0700 Subject: [PATCH] Enable CI tests for LLVM 12. --- .github/workflows/main.yml | 17 +++++++++++++++-- travis.sh | 19 +++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aee9ed4a..afa91144 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: ['ubuntu-16.04', 'ubuntu-18.04', 'macos-10.15'] - llvm: ['3.8', '5.0', '6.0', '7', '8', '9', '10', '11'] + llvm: ['3.8', '5.0', '6.0', '7', '8', '9', '10', '11', '12'] cmake: ['0', '1'] cuda: ['0', '1'] static: ['0', '1'] @@ -38,10 +38,12 @@ jobs: llvm: '10' - os: 'ubuntu-16.04' llvm: '11' + - os: 'ubuntu-16.04' + llvm: '12' - os: 'ubuntu-18.04' llvm: '3.8' - # macOS: exclude LLVM 5.0, 8-11 make, cuda/no-static/no-slib + # macOS: exclude LLVM 5.0, 8-12 make, cuda/no-static/no-slib - os: 'macos-10.15' llvm: '5.0' - os: 'macos-10.15' @@ -56,6 +58,9 @@ jobs: - os: 'macos-10.15' llvm: '11' cmake: '0' + - os: 'macos-10.15' + llvm: '12' + cmake: '0' - os: 'macos-10.15' cuda: '1' - os: 'macos-10.15' @@ -103,6 +108,8 @@ jobs: cuda: '1' - llvm: '11' cuda: '1' + - llvm: '12' + cuda: '1' # no-static: only LLVM 8 - llvm: '3.8' @@ -119,6 +126,8 @@ jobs: static: '0' - llvm: '11' static: '0' + - llvm: '12' + static: '0' # no-slib: only LLVM 9 - llvm: '3.8' @@ -135,6 +144,8 @@ jobs: slib: '0' - llvm: '11' slib: '0' + - llvm: '12' + slib: '0' # Moonjit: only LLVM 9 - llvm: '3.8' @@ -151,6 +162,8 @@ jobs: lua: 'moonjit' - llvm: '11' lua: 'moonjit' + - llvm: '12' + lua: 'moonjit' steps: - uses: actions/checkout@v1 - run: ./travis.sh diff --git a/travis.sh b/travis.sh index fdc0f1f7..b3c92bfd 100755 --- a/travis.sh +++ b/travis.sh @@ -26,7 +26,16 @@ fi if [[ $(uname) = Linux ]]; then sudo apt-get update -qq - if [[ $LLVM_CONFIG = llvm-config-11 ]]; then + if [[ $LLVM_CONFIG = llvm-config-12 ]]; then + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository -y "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main" + for i in {1..5}; do sudo apt-get update -qq && break || sleep 15; done + sudo apt-get install -y llvm-12-dev clang-12 libclang-12-dev libedit-dev + export CMAKE_PREFIX_PATH=/usr/lib/llvm-12:/usr/share/llvm-12 + if [[ -n $STATIC_LLVM && $STATIC_LLVM -eq 0 ]]; then + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/llvm-12/lib" + fi + elif [[ $LLVM_CONFIG = llvm-config-11 ]]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo add-apt-repository -y "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main" for i in {1..5}; do sudo apt-get update -qq && break || sleep 15; done @@ -81,7 +90,13 @@ if [[ $(uname) = Linux ]]; then fi if [[ $(uname) = Darwin ]]; then - if [[ $LLVM_CONFIG = llvm-config-11 ]]; then + if [[ $LLVM_CONFIG = llvm-config-12 ]]; then + curl -L -O https://github.com/elliottslaughter/llvm-build/releases/download/llvm-12.0.1/clang+llvm-12.0.1-x86_64-apple-darwin.tar.xz + tar xf clang+llvm-12.0.1-x86_64-apple-darwin.tar.xz + ln -s clang+llvm-12.0.1-x86_64-apple-darwin/bin/llvm-config llvm-config-12 + ln -s clang+llvm-12.0.1-x86_64-apple-darwin/bin/clang clang-12 + export CMAKE_PREFIX_PATH=$PWD/clang+llvm-12.0.1-x86_64-apple-darwin + elif [[ $LLVM_CONFIG = llvm-config-11 ]]; then curl -L -O https://github.com/elliottslaughter/llvm-build/releases/download/llvm-11.0.1/clang+llvm-11.0.1-x86_64-apple-darwin.tar.xz tar xf clang+llvm-11.0.1-x86_64-apple-darwin.tar.xz ln -s clang+llvm-11.0.1-x86_64-apple-darwin/bin/llvm-config llvm-config-11