-
Notifications
You must be signed in to change notification settings - Fork 479
108 lines (94 loc) · 3.76 KB
/
ci-cmake-options.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
name: test cmake options
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
jobs:
build:
runs-on: ci-gcc10
if: ${{ github.repository != 'intel/pcm' }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: CMake default install
run: |
cmake --version
rm -rf ${{ github.workspace }}/build
cmake -B ${{ github.workspace }}/build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build
cd ${{ github.workspace }}/build
export VERBOSE=1
make install -j$(nproc)
- name: CMake Release install
run: |
cmake --version
rm -rf ${{ github.workspace }}/build
cmake -B ${{ github.workspace }}/build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=Release
cd ${{ github.workspace }}/build
export VERBOSE=1
make install -j$(nproc)
- name: CMake Debug install
run: |
cmake --version
rm -rf ${{ github.workspace }}/build
cmake -B ${{ github.workspace }}/build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=Debug
cd ${{ github.workspace }}/build
export VERBOSE=1
make install -j$(nproc)
- name: CMake RelWithDebInfo install
run: |
cmake --version
rm -rf ${{ github.workspace }}/build
cmake -B ${{ github.workspace }}/build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cd ${{ github.workspace }}/build
export VERBOSE=1
make install -j$(nproc)
- name: CMake Custom build install
run: |
cmake --version
rm -rf ${{ github.workspace }}/build
cmake -B ${{ github.workspace }}/build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build -DCMAKE_CXX_FLAGS_CUSTOM:STRING="-O2 -g" -DCMAKE_BUILD_TYPE=CUSTOM
cd ${{ github.workspace }}/build
export VERBOSE=1
make install -j$(nproc)
- name: CMake Include systemd unit
run: |
cmake --version
rm -rf ${{ github.workspace }}/build
cmake -B ${{ github.workspace }}/build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build -DLINUX_SYSTEMD=TRUE -DLINUX_SYSTEMD_UNITDIR=${{ github.workspace }}/build/systemd
cd ${{ github.workspace }}/build
export VERBOSE=1
make install -j$(nproc)
- name: CMake User-flags build install
run: |
cmake --version
rm -rf ${{ github.workspace }}/build
cmake -B ${{ github.workspace }}/build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build -DCMAKE_CXX_FLAGS="-O2 -g -fPIC"
cd ${{ github.workspace }}/build
export VERBOSE=1
make install -j$(nproc)
- name: CMake env var option build install
run: |
cmake --version
rm -rf ${{ github.workspace }}/build
export CXXFLAGS="-grecord-gcc-switches"
export CFLAGS="-fstack-protector-strong"
export LDFLAGS="-Wl,-z,now"
cmake -B ${{ github.workspace }}/build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build -DCMAKE_CXX_FLAGS_CUSTOM:STRING="-O2 -g -fPIC" -DCMAKE_BUILD_TYPE=CUSTOM
cd ${{ github.workspace }}/build
export VERBOSE=1
make install -j$(nproc)
- name: CMake env var option build install (no custom flags)
run: |
cmake --version
rm -rf ${{ github.workspace }}/build
export CXXFLAGS="-grecord-gcc-switches"
export CFLAGS="-fstack-protector-strong"
export LDFLAGS="-Wl,-z,now"
cmake -B ${{ github.workspace }}/build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=CUSTOM
cd ${{ github.workspace }}/build
export VERBOSE=1
make install -j$(nproc)
- name: Diagnostic
run: date