mirror of
https://github.com/aristocratos/btop.git
synced 2026-01-23 21:40:45 -05:00
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: Linux CMake
|
|
|
|
on:
|
|
push:
|
|
branches: main
|
|
tags-ignore: '*.*'
|
|
paths:
|
|
- '.github/workflows/cmake-linux.yml'
|
|
- 'CMakeLists.txt'
|
|
- 'include/**'
|
|
- 'src/*pp'
|
|
- 'src/linux/*pp'
|
|
pull_request:
|
|
branches: main
|
|
paths:
|
|
- '.github/workflows/cmake-linux.yml'
|
|
- 'CMakeLists.txt'
|
|
- 'include/**'
|
|
- 'src/*pp'
|
|
- 'src/linux/*pp'
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.compiler }}-${{ matrix.version }}
|
|
runs-on: ubuntu-24.04
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.compiler }}-${{ matrix.version }}
|
|
cancel-in-progress: true
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- compiler: clang
|
|
version: 18
|
|
- compiler: clang
|
|
version: 19
|
|
- compiler: clang
|
|
version: 20
|
|
- compiler: gcc
|
|
version: 12
|
|
- compiler: gcc
|
|
version: 13
|
|
- compiler: gcc
|
|
version: 14
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install clang ${{ matrix.version }}
|
|
if: ${{ matrix.compiler == 'clang' }}
|
|
run: wget -qO - https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ matrix.version }} all
|
|
|
|
- name: Configure
|
|
run: |
|
|
if [[ "${{ matrix.compiler }}" == "clang" ]]; then
|
|
export CC=clang-${{ matrix.version }}
|
|
export CXX=clang++-${{ matrix.version }}
|
|
export CXXFLAGS="-stdlib=libc++"
|
|
export LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
|
|
else
|
|
export CC=gcc-${{ matrix.version }}
|
|
export CXX=g++-${{ matrix.version }}
|
|
fi
|
|
cmake -B build -G Ninja
|
|
|
|
- name: Compile
|
|
run: cmake --build build --verbose
|