forked from AngusJohnson/Clipper2
-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (147 loc) · 3.78 KB
/
actions_cpp.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: C++
on:
push:
pull_request:
jobs:
windows-latest:
runs-on: 'windows-latest'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Build
run: |
mkdir CPP/build
cd CPP/build
cmake .. -DCLIPPER2_TESTS=ON -DCLIPPER2_UTILS:BOOL=ON -DCLIPPER2_EXAMPLES:BOOL=ON
cmake --build . --config RelWithDebInfo --parallel
- name: Run tests
run: |
cd CPP/build
ctest . -C RelWithDebInfo --output-on-failure
ubuntu-latest-gcc-default:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Build
run: |
mkdir CPP/build
cd CPP/build
cmake .. -DCLIPPER2_TESTS=ON
make
- name: Run tests
run: |
cd CPP/build
env CTEST_OUTPUT_ON_FAILURE=1 make test
ubuntu-latest-gcc-11:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Install gcc 11
run: |
sudo apt update
sudo apt install gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
- name: Build
run: |
mkdir CPP/build
cd CPP/build
cmake .. -DCLIPPER2_TESTS=ON
make
- name: Run tests
run: |
cd CPP/build
env CTEST_OUTPUT_ON_FAILURE=1 make test
ubuntu-latest-clang-default:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Build
run: |
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
mkdir CPP/build
cd CPP/build
cmake .. -DCLIPPER2_TESTS=ON
make
- name: Run tests
run: |
cd CPP/build
env CTEST_OUTPUT_ON_FAILURE=1 make test
ubuntu-latest-clang-13:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Install clang 13
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 13
- name: Build
run: |
export CC=/usr/bin/clang-13
export CXX=/usr/bin/clang++-13
mkdir CPP/build
cd CPP/build
cmake .. -DCLIPPER2_TESTS=ON
make
- name: Run tests
run: |
cd CPP/build
env CTEST_OUTPUT_ON_FAILURE=1 make test
macos-latest:
runs-on: 'macos-latest'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Get GoogleTest
run: |
cd CPP/Tests
git clone https://github.com/google/googletest
- name: Build
run: |
mkdir CPP/build
cd CPP/build
cmake .. -DCLIPPER2_TESTS=ON
make
- name: Run tests
run: |
cd CPP/build
env CTEST_OUTPUT_ON_FAILURE=1 make test