summaryrefslogtreecommitdiff
path: root/.github/workflows/cmake-multi-platform.yml
blob: 95cafdf31faa15f3ed9716756d7896b3b95a8864 (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
name: CMake on multiple platforms

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

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

    strategy:
      fail-fast: false

      matrix:
        os: [ubuntu-latest, macos-15]
        build_type: [RelWithDebInfo]
        c_compiler: [gcc, clang]
        include:
          - os: macos-15
            c_compiler: clang
          - os: macos-15
            c_compiler: gcc-12
          - os: macos-15
            c_compiler: gcc-13
          - os: macos-15
            c_compiler: gcc-14
          - os: ubuntu-latest
            c_compiler: gcc
          - os: ubuntu-latest
            c_compiler: clang

    steps:
    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683  # v4.2.2

    - name: Build
      run: |
        #${{ matrix.c_compiler }} -v -std=gnu99 -Wall -Wextra -o see_defs main.c
        export CC=${{ matrix.c_compiler }}
        export SDKROOT=$(xcrun --show-sdk-path)
        mkdir build
        cd build
        cmake ..
        make

    - name: Test
      run: ./build/see_defs