diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c6cc7e871..8746c75c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,14 +16,14 @@ jobs: strategy: matrix: os: ['ubuntu-16.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'] slib: ['0', '1'] lua: ['luajit', 'moonjit'] exclude: - # 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' @@ -38,6 +38,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' @@ -85,6 +88,8 @@ jobs: cuda: '1' - llvm: '11' cuda: '1' + - llvm: '12' + cuda: '1' # no-static: only LLVM 8 - llvm: '3.8' @@ -101,6 +106,8 @@ jobs: static: '0' - llvm: '11' static: '0' + - llvm: '12' + static: '0' # no-slib: only LLVM 9 - llvm: '3.8' @@ -117,6 +124,8 @@ jobs: slib: '0' - llvm: '11' slib: '0' + - llvm: '12' + slib: '0' # Moonjit: only LLVM 9 - llvm: '3.8' @@ -133,6 +142,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 d682953a5..551c9eaff 100755 --- a/travis.sh +++ b/travis.sh @@ -29,7 +29,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/xenial/ llvm-toolchain-xenial-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/xenial/ llvm-toolchain-xenial-11 main" for i in {1..5}; do sudo apt-get update -qq && break || sleep 15; done @@ -104,7 +113,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