Skip to content

Commit

Permalink
adding basic CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelf committed Apr 9, 2024
1 parent 91c0034 commit 257c7f2
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/check_style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check coding style
on: [pull_request]
jobs:
coding_style:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run clang-format
shell: bash
run: |
format_changes=$(git clang-format-14 --quiet --diff \
${{ github.event.pull_request.base.sha }} \
${{ github.event.pull_request.head.sha }} | wc -c)
if [[ $format_changes -ne 0 ]]; then
echo "Please format your changes with clang-format using the LLVM style, e.g., git clang-format --style LLVM before committing"
exit 1
fi
74 changes: 74 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Compile SymCC RT
on: [pull_request, workflow_dispatch]
jobs:
build_symcc:
runs-on: ubuntu-22.04
strategy:
matrix:
llvm_version: [11, 12, 13, 14, 15]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
llvm-${{ matrix.llvm_version }}-dev \
libz3-dev \
- name: Build SymCC with the QSYM backend
run: |
mkdir build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DZ3_TRUST_SYSTEM_VERSION=ON \
-DSYMCC_RT_BACKEND=qsym \
-DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm_version }}/cmake \
..
ninja
- name: Build SymCC with the simple backend
run: |
mkdir build
cd build
cmake -G Ninja\
-DCMAKE_BUILD_TYPE=Release \
-DZ3_TRUST_SYSTEM_VERSION=ON \
-DSYMCC_RT_BACKEND=qsym \
-DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm_version }}/cmake \
..
ninja
llvm_compatibility_latest_llvm:
runs-on: ubuntu-22.04
strategy:
matrix:
llvm_version: [16, 17]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Add LLVM project deb repository
uses: myci-actions/add-deb-repo@11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.llvm_version }} main
repo-name: llvm
update: false
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
llvm-${{ matrix.llvm_version }}-dev \
libz3-dev \
- name: Build SymCC with the QSYM backend
run: |
mkdir build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DZ3_TRUST_SYSTEM_VERSION=ON \
-DQSYM_BACKEND=ON \
-DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm_version }}/cmake \
..
ninja

0 comments on commit 257c7f2

Please sign in to comment.