-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 976 Bytes
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: C++ CI with CMake Presets
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Installe les dépendances nécessaires
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build g++ gcc git
# Clone vcpkg repository and install with bootstrap script
- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
./vcpkg/vcpkg integrate install
# Configure the project using CMake Preset
- name: Configure CMake Project
run: cmake --preset default
# Build the project using CMake Preset
- name: Build Project
run: cmake --build --preset build-g++
# Run tests using CMake Preset
- name: Test Project
run: ctest --preset test-default-release