Skip to content

Commit

Permalink
Enable CI tests for LLVM 12.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Jul 12, 2021
1 parent 97d02d2 commit bb1b264
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -85,6 +88,8 @@ jobs:
cuda: '1'
- llvm: '11'
cuda: '1'
- llvm: '12'
cuda: '1'

# no-static: only LLVM 8
- llvm: '3.8'
Expand All @@ -101,6 +106,8 @@ jobs:
static: '0'
- llvm: '11'
static: '0'
- llvm: '12'
static: '0'

# no-slib: only LLVM 9
- llvm: '3.8'
Expand All @@ -117,6 +124,8 @@ jobs:
slib: '0'
- llvm: '11'
slib: '0'
- llvm: '12'
slib: '0'

# Moonjit: only LLVM 9
- llvm: '3.8'
Expand All @@ -133,6 +142,8 @@ jobs:
lua: 'moonjit'
- llvm: '11'
lua: 'moonjit'
- llvm: '12'
lua: 'moonjit'
steps:
- uses: actions/checkout@v1
- run: ./travis.sh
Expand Down
19 changes: 17 additions & 2 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bb1b264

Please sign in to comment.