x86-Ubuntu #199
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: [ main ] | |
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@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/jammy/ llvm-toolchain-jammy-19 main" | |
sudo apt-get update | |
sudo apt-get install -y llvm-19 llvm-19-dev llvm-19-tools clang-19 | |
- name: Clone GTest | |
run: git clone https://github.com/google/googletest.git | |
- name: Build and run | |
env: | |
CC: ${{ matrix.compiler.CC }} | |
CXX: ${{ matrix.compiler.CXX }} | |
run: | | |
cd $GITHUB_WORKSPACE | |
mkdir build && cd build | |
cmake -DCT_LLVM_INSTALL_DIR="/usr/lib/llvm-19/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ | |
make -j8 | |
./cppTutorUT |