-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.2 KB
/
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
40
41
42
43
44
45
46
47
48
49
name: CMake Build and Test
on:
push: # Trigger on any push to any branch
pull_request: # Trigger on any PR
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Set up dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake gcc g++ ninja-build libcurl4-openssl-dev pkg-config
# Configure the build
- name: Configure with CMake
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
# Build the project
- name: Build the project
run: |
ninja -C build
# Create temporary directory for logs
- name: Create temporary directory
run: |
export TMP=$(mktemp -d)
echo "Temporary directory created at $TMP"
echo "TMP=$TMP" >> $GITHUB_ENV
# Run tests
- name: Run tests
run: |
./build/bin/reai_test
# Output logs from the temporary directory
- name: Display logs
run: |
echo "Logs from $TMP:"
ls "$TMP"
cat "$TMP"/* || echo "No log files found"