Skip to content

Commit

Permalink
[minotaur] create CI configuration yml
Browse files Browse the repository at this point in the history
not yet working
  • Loading branch information
zhengyang92 authored Apr 25, 2024
1 parent 2654540 commit a92c3ed
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build

on: [push, pull_request]

jobs:
build:
name: ${{ matrix.os }} ${{ matrix.compiler }} ${{ matrix.build_type }} ${{ matrix.cache }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-22.04]
compiler: [g++-13, clang++-18, clang++-19]
build_type: [Release, Debug]
cache: ['', Redis]
include:
- os: macos-14
compiler: clang++
build_type: Release
- os: macos-14
compiler: clang++
build_type: Debug

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
if [[ ${{ matrix.compiler }} == "clang++-18" ]]; then
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main"
fi
if [[ ${{ matrix.compiler }} == "clang++-19" ]]; then
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
fi
sudo apt-get update
sudo apt-get install z3 re2c ninja-build
if [[ ${{ matrix.compiler }} == "clang++-18" ]]; then
sudo apt-get install clang++-18
fi
if [[ ${{ matrix.compiler }} == "clang++-19" ]]; then
sudo apt-get install clang++-19
fi
if [[ "${{ matrix.cache }}" == "Redis" ]]; then
sudo apt-get install libhiredis-dev
fi
- name: Install dependencies (MacOS)
if: runner.os == 'macOS'
run: |
brew install z3 re2c ninja
- name: Compile
run: ./.github/scripts/build.sh

- name: Run Tests
run: ninja check
working-directory: build

env:
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
CMAKE_CXX_COMPILER: ${{ matrix.compiler }}
CMAKE_CXX_FLAGS: "-fsanitize=address,undefined"

0 comments on commit a92c3ed

Please sign in to comment.