From 2db8caa4c7f3553ea736bc7cba920a748e26a318 Mon Sep 17 00:00:00 2001 From: "Mr.UNIX" <99476714+mrunix00@users.noreply.github.com> Date: Thu, 4 Jul 2024 18:03:22 +0100 Subject: [PATCH] CI: Setup Github Actions --- .github/workflows/c-cpp.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..5d6304e --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,33 @@ +name: C/C++ CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build-gcc: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: install packages + run: sudo apt-get install -y flex bison + - name: build the app + run: mkdir build && cd build && cmake .. && cmake --build . + - name: run the tests + run: ./build/tests + + build-clang: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: install packages + run: sudo apt-get install -y clang-12 clang++-12 flex bison + - name: build the app + run: mkdir build && cd build && export CXX=clang++-12 && export CC=clang-12 && cmake .. && cmake --build . + - name: run the tests + run: ./build/tests