Skip to content

Commit

Permalink
Setup Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mrunix00 authored Jul 4, 2024
1 parent 4e6a511 commit 7c4a6a3
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -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: ctest --test-dir build/tests -V

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: ctest --test-dir build/tests -V

0 comments on commit 7c4a6a3

Please sign in to comment.