Skip to content

Push 2024 12 13

Push 2024 12 13 #1123

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"
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" -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