-
Notifications
You must be signed in to change notification settings - Fork 53
167 lines (160 loc) · 4.03 KB
/
c-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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: Build YARPGen and generate sample tests
on: [push, pull_request, workflow_dispatch]
jobs:
build-and-run-lin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check environment
run: |
cat /proc/cpuinfo
- name: configure and build
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4
- name: run tests
run: |
build/type_test
build/data_test
build/expr_test
build/gen_test
- name: generate cpp tests
run: |
mkdir tests-cpp && cd tests-cpp
for i in {0..9}
do
mkdir $i && cd $i
../../build/yarpgen --std=c++
cd ..
done
- name: generate sycl tests
run: |
mkdir tests-sycl && cd tests-sycl
for i in {0..9}
do
mkdir $i && cd $i
../../build/yarpgen --std=sycl
cd ..
done
- name: generate ispc tests
run: |
mkdir tests-ispc && cd tests-ispc
for i in {0..10}
do
mkdir $i && cd $i
../../build/yarpgen --std=ispc
cd ..
done
- name: Upload cpp tests
uses: actions/upload-artifact@v2
with:
name: tests-cpp-lin
path: tests-cpp
- name: Upload sycl tests
uses: actions/upload-artifact@v2
with:
name: tests-sycl-lin
path: tests-sycl
- name: Upload ispc tests
uses: actions/upload-artifact@v2
with:
name: tests-ispc-lin
path: tests-ispc
build-and-run-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Check environment
run: |
sysctl -n machdep.cpu.brand_string
- name: configure and build
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4
- name: run tests
run: |
build/type_test
build/data_test
build/expr_test
build/gen_test
- name: generate cpp tests
run: |
mkdir tests-cpp && cd tests-cpp
for i in {0..9}
do
mkdir $i && cd $i
../../build/yarpgen --std=c++
cd ..
done
- name: generate sycl tests
run: |
mkdir tests-sycl && cd tests-sycl
for i in {0..9}
do
mkdir $i && cd $i
../../build/yarpgen --std=sycl
cd ..
done
- name: generate ispc tests
run: |
mkdir tests-ispc && cd tests-ispc
for i in {0..10}
do
mkdir $i && cd $i
../../build/yarpgen --std=ispc
cd ..
done
- name: Upload cpp tests
uses: actions/upload-artifact@v2
with:
name: tests-cpp-mac
path: tests-cpp
- name: Upload sycl tests
uses: actions/upload-artifact@v2
with:
name: tests-sycl-mac
path: tests-sycl
- name: Upload ispc tests
uses: actions/upload-artifact@v2
with:
name: tests-ispc-mac
path: tests-ispc
build-and-run-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Check environment
shell: cmd
run: |
wmic cpu get caption, deviceid, name, numberofcores, maxclockspeed, status
- name: configure and build
shell: cmd
run: |
mkdir build
cmake -B build -DCMAKE_BUILD_TYPE=Release .
cmake --build build -j4 --config Release
- name: run tests
shell: cmd
run: |
cd build\Release
type_test.exe
data_test.exe
expr_test.exe
gen_test.exe
- name: generate cpp tests
shell: cmd
run: |
mkdir tests-cpp && cd tests-cpp
..\build\Release\yarpgen.exe --std=c++
- name: generate sycl tests
shell: cmd
run: |
mkdir tests-sycl && cd tests-sycl
..\build\Release\yarpgen.exe --std=sycl
- name: generate ispc tests
shell: cmd
run: |
mkdir tests-ispc && cd tests-ispc
..\build\Release\yarpgen.exe --std=ispc