-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (54 loc) · 1.75 KB
/
test-base.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
name: Run Tests
on:
pull_request:
branches:
- "**"
jobs:
test-native:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
build-type: [Debug, Release]
build-shared: [OFF, ON]
include:
- os: windows-latest
preset: patomic-ci-windows-msvc
- os: macos-latest
preset: patomic-ci-unix-clang
- os: ubuntu-latest
preset: patomic-ci-unix-clang
- os: ubuntu-latest
preset: patomic-ci-unix-gcc
- os: ubuntu-latest
preset: patomic-ci-unix-gnu-ansi
steps:
- name: Checkout patomic
uses: actions/checkout@v4
with:
path: patomic
- name: Checkout GoogleTest
uses: actions/checkout@v4
with:
repository: google/googletest
path: googletest
- name: Build and Install GoogleTest
run: |
cd googletest
mkdir googletest
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} ..
cmake --build . --config ${{ matrix.build-type }}
cmake --install . --config ${{ matrix.build-type }} --prefix install
- name: Build patomic
run: |
cd patomic
mkdir build
cd build
cmake --preset ${{ matrix.preset }} -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DGTest_DIR=../../googletest/build/install/lib/cmake/GTest ..
cmake --build . --config ${{ matrix.build-type }}
- name: Test patomic
run: |
cd patomic/build
ctest -C ${{ matrix.build-type }} .