Skip to content

Commit

Permalink
Create c-cpp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
angelof-exe authored Aug 2, 2024
1 parent b3f0a21 commit 7c014b3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CMake Build and Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

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

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake libboost-all-dev

- name: Create build directory
run: mkdir -p build

- name: Configure CMake
run: cmake -S . -B build

- name: Build the project
run: cmake --build build

- name: Run tests
run: ctest --test-dir build

- name: Clean up
run: |
rm -rf build

0 comments on commit 7c014b3

Please sign in to comment.