File: ci.yml

package info (click to toggle)
inja 3.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,620 kB
  • sloc: cpp: 30,997; python: 189; makefile: 16; sh: 3
file content (100 lines) | stat: -rw-r--r-- 2,539 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: CI

on: [push, pull_request]

jobs:
  build-and-test:
    name: test-${{ matrix.name }}
    runs-on: ${{ matrix.os }}

    strategy:
      fail-fast: false
      matrix:
        include:
          - name: ubuntu-22.04-gcc
            os: ubuntu-22.04
            compiler: gcc

          - name: ubuntu-22.04-clang
            os: ubuntu-22.04
            compiler: clang

          - name: ubuntu-22.04-clang-tidy
            os: ubuntu-22.04
            compiler: clang
            cmake_vars: "-DINJA_ENABLE_CLANG_TIDY=ON"

          - name: ubuntu-22.04-clang-15-no-exceptions
            os: ubuntu-22.04
            compiler: clang-15
            cmake_vars: "-DCMAKE_CXX_FLAGS=-fno-exceptions -DBUILD_TESTING=OFF"

          - name: ubuntu-24.04-gcc
            os: ubuntu-24.04
            compiler: gcc

          - name: windows-2022-msvc
            os: windows-2022
            compiler: msvc

          - name: windows-2022-clang
            os: windows-2022
            compiler: clang

          - name: windows-2022-gcc
            os: windows-2022
            compiler: gcc

          - name: windows-2025-msvc
            os: windows-2025
            compiler: msvc

          - name: macOS-13-gcc
            os: macOS-13
            compiler: gcc

          - name: macOS-13-clang
            os: macOS-13
            compiler: clang

    steps:
      - uses: actions/checkout@v4

      - name: Setup Cpp
        uses: aminya/setup-cpp@v0.46.1
        with:
          compiler: ${{ matrix.compiler }}

      - name: Build & Test Debug
        run: |
          cmake -E remove_directory build
          cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug
          cmake --build build -j2
          cd build && ctest -j2 --output-on-failure

      - name: Build & Test Release
        run: |
          cmake -E remove_directory build
          cmake -B build -S . -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_vars }}
          cmake --build build -j2
          cd build && ctest -j2 --output-on-failure


  check-single-include:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - name: Update single include
      run: |
        mv single_include/inja/inja.hpp single_include/inja/inja_old.hpp
        bash scripts/update_single_include.sh

    - name: Check if equal
      working-directory: single_include
      run: diff inja/inja.hpp inja/inja_old.hpp >/dev/null

    - uses: actions/upload-artifact@v4
      with:
        name: single_include_inja
        path: single_include/inja/inja.hpp