-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.01 KB
/
package.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
name: Run Google Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Install Dependencies
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential cmake g++ libgtest-dev
# Build Google Test from source
cd /usr/src/googletest
sudo cmake -DBUILD_SHARED_LIBS=ON .
sudo make
# Install headers and built libraries
# sudo cp -r googletest/include/gtest /usr/local/include
# sudo cp -r googlemock/include/gmock /usr/local/include
# sudo cp googletest/*.a /usr/local/lib
# sudo cp googlemock/*.a /usr/local/lib
# Step 3: Build and Run Tests
- name: Build and run tests
run: |
# mkdir build
# cd build
# cmake ..
# make
# ./main
make test