aboutsummaryrefslogtreecommitdiffstats
path: root/t/unit-tests/clar/.github/workflows/ci.yml
blob: 4d4724222c3e89f7ec3a3355e56ea0a79becb5d4 (plain) (blame)
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
name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    strategy:
      matrix:
        platform:
          - os: ubuntu-latest
            generator: Unix Makefiles
            env:
              CFLAGS: "-Werror -Wall -Wextra"
          - os: ubuntu-latest
            generator: Unix Makefiles
            env:
              CC: "clang"
              CFLAGS: "-Werror -Wall -Wextra -fsanitize=leak"
          - os: ubuntu-latest
            generator: Unix Makefiles
            image: i386/debian:latest
            env:
              CFLAGS: "-Werror -Wall -Wextra"
          - os: macos-latest
            generator: Unix Makefiles
            env:
              CFLAGS: "-Werror -Wall -Wextra"
          - os: windows-latest
            generator: Visual Studio 17 2022
          - os: windows-latest
            generator: MSYS Makefiles
            env:
              CFLAGS: "-Werror -Wall -Wextra"
          - os: windows-latest
            generator: MinGW Makefiles
            env:
              CFLAGS: "-Werror -Wall -Wextra"
      fail-fast: false

    runs-on: ${{ matrix.platform.os }}
    container: ${{matrix.platform.image}}

    env:
      CC: ${{matrix.platform.env.CC}}
      CFLAGS: ${{matrix.platform.env.CFLAGS}}

    steps:
    - name: Prepare 32 bit container image
      if: matrix.platform.image == 'i386/debian:latest'
      run: apt -q update && apt -q -y install cmake gcc libc6-amd64 lib64stdc++6 make python3
    - name: Check out
      uses: actions/checkout@v4
    - name: Build
      shell: bash
      run: |
        mkdir build
        cd build
        cmake .. -G "${{matrix.platform.generator}}"
        cmake --build . --verbose
    - name: Test
      shell: bash
      run: |
        cd build
        CTEST_OUTPUT_ON_FAILURE=1 ctest --build-config Debug