File: cmake-macos.yml

package info (click to toggle)
btop 1.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,056 kB
  • sloc: cpp: 29,113; ansic: 5,333; makefile: 350
file content (52 lines) | stat: -rw-r--r-- 1,425 bytes parent folder | download
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
name: macOS CMake

on:
  push:
    branches: main
    tags-ignore: '*.*'
    paths:
      - '.github/workflows/cmake-macos.yml'
      - 'CMakeLists.txt'
      - 'cmake/**'
      - 'include/**'
      - 'src/*pp'
      - 'src/osx/*pp'
  pull_request:
    branches: main
    paths:
      - '.github/workflows/cmake-macos.yml'
      - 'CMakeLists.txt'
      - 'cmake/**'
      - 'include/**'
      - 'src/*pp'
      - 'src/osx/*pp'

jobs:
  cmake_build_on_macos:
    runs-on: macos-15
    concurrency:
      group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
      cancel-in-progress: true
    steps:
      - uses: actions/checkout@v6

      - name: Install build tools
        run: |
          export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
          brew update --quiet
          brew install --force --overwrite cmake llvm lld ninja

      - name: Configure
        run: |
          export LLVM_PREFIX="$(brew --prefix llvm)"
          export LLD_PREFIX="$(brew --prefix lld)"
          export CXX="$LLVM_PREFIX/bin/clang++"
          export CPPFLAGS="-I$LLVM_PREFIX/include"
          export LDFLAGS="-L$LLVM_PREFIX/lib -L$LLVM_PREFIX/lib/c++ -Wl,-rpath,$LLVM_PREFIX/lib/c++ -fuse-ld=$LLD_PREFIX/bin/ld64.lld"
          cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug

      - name: Compile
        run: cmake --build build --verbose

      - name: Test
        run: ctest --test-dir build