Skip to content

x86-Ubuntu

x86-Ubuntu #1712

Workflow file for this run

name: x86-Ubuntu
on:
push:
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
compiler:
- { compiler: GNU, CC: gcc-10, CXX: g++-10 }
- { compiler: LLVM, CC: clang-10, CXX: clang++-10 }
type: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-19 main"
sudo apt-get update
sudo apt-get install -y llvm-19 llvm-19-dev libllvm19 clang-19 libclang-common-19-dev libclang-19-dev llvm-19-tools
sudo apt-get install python3-setuptools
sudo apt-get install ${{ matrix.compiler.CXX }}
sudo pip3 install lit
- name: Build HelloWorld
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
run: |
cd HelloWorld
mkdir build && cd build
# HelloWorld only supports CT_Clang_INSTALL_DIR
cmake -DCT_Clang_INSTALL_DIR=/usr/lib/llvm-19/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../
make -j2
/usr/lib/llvm-19/bin/clang -cc1 -load ./libHelloWorld.so -plugin hello-world $GITHUB_WORKSPACE/test/HelloWorld-basic.cpp
- name: Build clang-tutor + run tests
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
run: |
cd $GITHUB_WORKSPACE
mkdir build && cd build
# Test with Clang_ROOT
cmake -DClang_ROOT=/usr/lib/llvm-19/lib/cmake/clang/ -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../
make -j2
lit test/