-
Notifications
You must be signed in to change notification settings - Fork 479
116 lines (100 loc) · 3.99 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
109
110
111
112
113
114
115
116
name: test cmake options
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
permissions:
contents: read
jobs:
build:
runs-on: ci-gcc10
if: ${{ github.repository != 'intel/pcm' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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