File: cmake_subdir_example.yml

package info (click to toggle)
sqlitecpp 3.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,608 kB
  • sloc: ansic: 166,965; cpp: 3,720; python: 2,374; xml: 14; sh: 12; makefile: 8
file content (43 lines) | stat: -rw-r--r-- 1,176 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
name: CMake build of example in subdirectory

on: [push, pull_request]

jobs:
  build:
    name: ${{ matrix.config.name }}
    runs-on: ${{ matrix.config.os }}
    strategy:
      fail-fast: false
      matrix:
        config:
        - {
            name: "Windows Latest MSVC",
            os: windows-latest,
            build_type: "Debug", cc: "cl", cxx: "cl",
          }
        - {
            name: "Ubuntu Latest GCC",
            os: ubuntu-latest,
            build_type: "Debug", cc: "gcc", cxx: "g++"
          }
        - {
            name: "macOS Latest Clang",
            os: macos-latest,
            build_type: "Debug", cc: "clang", cxx: "clang++"
          }

    steps:
    - uses: actions/checkout@v4
    - name: configure
      shell: cmake -P {0}
      run: |
        set(ENV{CC} ${{matrix.config.cc}})
        set(ENV{CXX} ${{matrix.config.cxx}})
    - name: generate
      run: |
        cd examples/example2
        mkdir build
        cd build
        cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} .. 
    - name: build
      run: cmake --build examples/example2/build --config ${{matrix.config.build_type}}