-
Notifications
You must be signed in to change notification settings - Fork 2
125 lines (110 loc) · 4.27 KB
/
cmake.yml
File metadata and controls
125 lines (110 loc) · 4.27 KB
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
name: CMake
defaults:
run:
shell: bash -ieo pipefail {0}
on:
push:
branches: [ master, alpha ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * 1'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
echo "install ZAF"
cd ${{github.workspace}}/../
git clone --depth 1 https://github.com/zzxx-husky/inst_scripts
./inst_scripts/install_coll.sh --deps-only
cd ${{github.workspace}}
echo "Install Clang"
sudo apt install clang
clang --version
clang++ --version
- name: Configure CMake
# Configure CMake in a 'release' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
source ${{github.workspace}}/../inst_scripts/instrc.sh
echo ${ZMQ_ROOT}
echo ${GTEST_ROOT}
echo ${GLOG_ROOT}
echo ${PHMAP_ROOT}
echo ${ZAF_ROOT}
cmake -S . -B ${{github.workspace}}/release -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/release -j4
- name: Test
working-directory: ${{github.workspace}}/release
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: timeout 10 ./tests/Tests
- name: Examples
working-directory: ${{github.workspace}}/release
run: |
echo "Run HelloWorld"
timeout 10 ./examples/HelloWorld
echo "Run Calendar"
timeout 10 ./examples/Calendar
echo "Run FirstNMax"
timeout 10 ./examples/FirstNMax
echo "Run TopkFreqWords"
timeout 10 ./examples/TopkFreqWords
echo "RUn SortUnique"
timeout 10 ./examples/SortUnique
echo "ParallelSort"
timeout 20 ./benchmarks/ParallelSort
- name: BuildMini
run: |
source ${{github.workspace}}/../inst_scripts/instrc.sh
cmake -S . -B ${{github.workspace}}/release_mini -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_TEST=false -DENABLE_PARALLEL=false
cmake --build ${{github.workspace}}/release_mini -j4
cd ${{github.workspace}}/release_mini
echo "Run HelloWorld"
timeout 10 ./examples/HelloWorld
echo "Run Calendar"
timeout 10 ./examples/Calendar
echo "Run FirstNMax"
timeout 10 ./examples/FirstNMax
echo "Run TopkFreqWords"
timeout 10 ./examples/TopkFreqWords
echo "RUn SortUnique"
timeout 10 ./examples/SortUnique
- name: Gperftools Heap Profile
working-directory: ${{github.workspace}}/release
run: |
PPROF_PATH="$(which pprof)" HEAPCHECK=strict timeout 30 ./examples/HelloWorld
PPROF_PATH="$(which pprof)" HEAPCHECK=strict timeout 30 ./examples/Calendar
- name: Compile with Clang
run: |
source ${{github.workspace}}/../inst_scripts/instrc.sh
cmake -S . -B ${{github.workspace}}/release_clang -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/release_clang -j4
cd ${{github.workspace}}/release_clang
echo "Run HelloWorld"
timeout 10 ./examples/HelloWorld
echo "Run Calendar"
timeout 10 ./examples/Calendar
echo "Run FirstNMax"
timeout 10 ./examples/FirstNMax
echo "Run TopkFreqWords"
timeout 10 ./examples/TopkFreqWords
echo "RUn SortUnique"
timeout 10 ./examples/SortUnique
env:
CC: clang
CXX: clang++