x86-Ubuntu-llvm-from-sources #1745
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: x86-Ubuntu-llvm-from-sources | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Download Ninja | |
run: | | |
git clone https://github.com/ninja-build/ninja.git | |
pushd ninja | |
./configure.py --bootstrap | |
# chmod +x ninja | |
./ninja --version | |
popd | |
- name: Add Ninja to $PATH | |
run: | | |
echo "${GITHUB_WORKSPACE}/ninja" >> $GITHUB_PATH | |
- name: Clone llvm-project | |
run: | | |
git clone --depth 10 --single-branch --branch release/19.x https://github.com/llvm/llvm-project | |
- name: Build LLVM | |
run: | | |
cd llvm-project | |
mkdir build && cd build | |
ln -s /usr/bin/x86_64-linux-gnu-ld.gold ld | |
cmake -G Ninja \ | |
-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" \ | |
-DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_OPTIMIZED_TABLEGEN=ON \ | |
../llvm | |
# Note that only the required tools are built | |
ninja clang opt lli not FileCheck | |
- name: Install lit | |
run: | | |
sudo apt-get install python3-setuptools | |
sudo pip3 install lit | |
- name: Build HelloWorld | |
run: | | |
cd HelloWorld | |
mkdir build && cd build | |
cmake -DLT_LLVM_INSTALL_DIR="$GITHUB_WORKSPACE/llvm-project/build" ../ | |
make -j2 | |
- name: Build llvm-tutor + run tests | |
run: | | |
mkdir build && cd build | |
cmake -DLT_LLVM_INSTALL_DIR="$GITHUB_WORKSPACE/llvm-project/build" ../ | |
make -j2 | |
lit test/ |