File: meson.yml

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

on: [push, pull_request]

jobs:
  build:
    name: (Meson) ${{ matrix.config.name }}
    runs-on: ${{ matrix.config.os }}
    strategy:
      fail-fast: false
      matrix:
        config:
        - {
            name: "Windows Latest MSVC",
            os: windows-latest,
            cc: "cl", cxx: "cl",
            extra_path: "",
            requires_msvc: true,
          }
        - {
            name: "Windows Latest MinGW",
            os: windows-latest,
            cc: "gcc", cxx: "g++",
            extra_path: "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw64\\bin",
          }
        - {
            name: "Windows Latest Clang",
            os: windows-latest,
            cc: "clang", cxx: "clang++", c_ld: "lld-link", cxx_ld: "lld-link",
            extra_path: "",
          }
        - {
            name: "Ubuntu Latest GCC",
            os: ubuntu-latest,
            cc: "gcc", cxx: "g++",
            extra_path: ""
          }
        - {
            name: "Ubuntu Latest Clang",
            os: ubuntu-latest,
            cc: "clang", cxx: "clang++", c_ld: "lld", cxx_ld: "lld",
            extra_path: ""
          }
        - {
            name: "macOS Latest Clang",
            os: macos-latest,
            cc: "clang", cxx: "clang++",
            extra_path: ""
          }

    steps:
    - uses: actions/checkout@v4
    # use msvc-dev-cmd to setup the environment for MSVC if needed
    - name: setup MSVC
      if: matrix.config.requires_msvc
      uses: ilammy/msvc-dev-cmd@v1
    - name: extra_path
      shell: bash
      run: echo "${{matrix.config.extra_path}}" >> $GITHUB_PATH
    - name: install prerequisites
      run: |
        # asuming that python and pipx are already installed
        pipx install meson ninja
    - name: setup meson project
      env: # set proper compilers and linkers for meson
        CC: ${{matrix.config.cc}}
        CXX: ${{matrix.config.cxx}}
        C_LD: ${{matrix.config.c_ld}}
        CXX_LD: ${{matrix.config.cxx_ld}}
      run: |
        # setup the build directory with tests and examples enabled
        meson setup builddir -DSQLITECPP_BUILD_TESTS=true -DSQLITECPP_BUILD_EXAMPLES=true --force-fallback-for=sqlite3
    - name: build meson project
      run: |
        # build the project
        meson compile -C builddir
    - name: test
      run: |
        # run the tests
        meson test -C builddir