Skip to content

chore: Sistemazione e pulizia codice #5

chore: Sistemazione e pulizia codice

chore: Sistemazione e pulizia codice #5

Workflow file for this run

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: Move executable to root directory
run: |
if [ -f build/main ]; then mv build/main .; fi
if [ -f build/main.exe ]; then mv build/main.exe .; fi
- name: Make executable
run: chmod +x main
- name: Run tests
run: ctest --test-dir build
- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: main
path: |
main
main.exe
- name: Clean up
run: rm -rf build