-
Notifications
You must be signed in to change notification settings - Fork 59
124 lines (99 loc) · 3.58 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
name: Build and run tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
ICX:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt -y install g++-10 libgtest-dev meson curl git cmake
- name: Install google benchmarks
run: |
git clone https://github.com/google/benchmark.git
cd benchmark
cmake -E make_directory "build"
cmake -E chdir "build" cmake -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ../
sudo cmake --build "build" --config Release --target install
- name: Install Intel SDE
run: |
curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/732268/sde-external-9.7.0-2022-05-09-lin.tar.xz
mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/
sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde
- name: Build
env:
CXX: g++-10
run: |
make clean
meson setup --warnlevel 2 --werror --buildtype plain builddir
cd builddir
ninja
- name: Run test suite on ICX
run: sde -icx -- ./builddir/testexe
SPR:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt -y install g++-12 libgtest-dev meson curl git cmake
- name: Install google benchmarks
run: |
git clone https://github.com/google/benchmark.git
cd benchmark
cmake -E make_directory "build"
cmake -E chdir "build" cmake -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ../
sudo cmake --build "build" --config Release --target install
- name: Install Intel SDE
run: |
curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/732268/sde-external-9.7.0-2022-05-09-lin.tar.xz
mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/
sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde
- name: Build
env:
CXX: g++-12
run: |
make clean
meson setup --warnlevel 2 --werror --buildtype plain builddir
cd builddir
ninja
- name: Run _Float16 test suite on SPR
run: sde -spr -- ./builddir/testexe --gtest_filter="*float16*"
compare-benchmarks-with-main:
if: ${{ false }} # disable for now
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
path: x86-simd-sort
- name: Specify branch name
working-directory: ${{ github.workspace }}/x86-simd-sort
run: git switch -c pr-branch
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
sudo apt update
sudo apt -y install g++-12 libgtest-dev meson curl git cmake
- name: Install google benchmarks
run: |
git clone https://github.com/google/benchmark.git
cd benchmark
pip3 install -r tools/requirements.txt
cmake -E make_directory "build"
cmake -E chdir "build" cmake -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ../
sudo cmake --build "build" --config Release --target install
- name: Run bench-compare
working-directory: ${{ github.workspace }}/x86-simd-sort
env:
CXX: g++-12
GBENCH: ${{ github.workspace }}/benchmark
run: bash -x scripts/branch-compare.sh avx