x86-Ubuntu #1742
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 | |
on: | |
push: | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
compiler: | |
- { compiler: GNU, CC: gcc, CXX: g++ } | |
- { compiler: LLVM, CC: clang, CXX: clang++ } | |
type: [Debug, Release] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install Dependencies | |
env: | |
CC: ${{ matrix.compiler.CC }} | |
CXX: ${{ matrix.compiler.CXX }} | |
run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | |
sudo apt-get update | |
sudo apt-get install -y llvm-16 llvm-16-dev llvm-16-tools clang-16 | |
sudo apt-get install python3-setuptools | |
sudo pip3 install lit | |
- name: Build HelloWorld | |
env: | |
CC: ${{ matrix.compiler.CC }} | |
CXX: ${{ matrix.compiler.CXX }} | |
run: | | |
cd HelloWorld | |
mkdir build && cd build | |
cmake -DLT_LLVM_INSTALL_DIR="/usr/lib/llvm-16/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ | |
make -j2 | |
- name: Build llvm-tutor + run tests | |
run: | | |
cd $GITHUB_WORKSPACE | |
mkdir build && cd build | |
cmake -DLT_LLVM_INSTALL_DIR="/usr/lib/llvm-16/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ | |
make -j2 | |
lit -va test/ |