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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Build
on:
    pull_request:
    push:
        branches: [ ci, master, latest, 3.3-stable ]
permissions:
    statuses: write
    contents: read

jobs:
    build-linux-x11-clang:
        name: X11 (Linux, Clang)
        runs-on: ubuntu-latest
        env:
            CC: clang
            CFLAGS: -Werror
        steps:
            - uses: actions/checkout@v2
            - name: Install dependencies
              run: |
                  sudo apt update
                  sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev

            - name: Configure static library
              run: cmake -S . -B build-static
            - name: Build static library
              run: cmake --build build-static --parallel

            - name: Configure shared library
              run: cmake -S . -B build-shared -D BUILD_SHARED_LIBS=ON
            - name: Build shared library
              run: cmake --build build-shared --parallel

    build-linux-wayland-clang:
        name: Wayland (Linux, Clang)
        runs-on: ubuntu-latest
        env:
            CC: clang
            CFLAGS: -Werror
        steps:
            - uses: actions/checkout@v2
            - name: Install dependencies
              run: |
                  sudo apt update
                  sudo apt install wayland-protocols libwayland-dev libxkbcommon-dev

            - name: Configure static library
              run: cmake -S . -B build-static -D GLFW_USE_WAYLAND=ON
            - name: Build static library
              run: cmake --build build-static --parallel

            - name: Configure shared library
              run: cmake -S . -B build-shared -D GLFW_USE_WAYLAND=ON -D BUILD_SHARED_LIBS=ON
            - name: Build shared library
              run: cmake --build build-shared --parallel

    build-linux-null-clang:
        name: Null (Linux, Clang)
        runs-on: ubuntu-latest
        env:
            CC: clang
            CFLAGS: -Werror
        steps:
            - uses: actions/checkout@v2
            - name: Install dependencies
              run: |
                  sudo apt update
                  sudo apt install libosmesa6-dev

            - name: Configure static library
              run: cmake -S . -B build-static -D GLFW_USE_OSMESA=ON
            - name: Build static library
              run: cmake --build build-static --parallel

            - name: Configure shared library
              run: cmake -S . -B build-shared -D GLFW_USE_OSMESA=ON -D BUILD_SHARED_LIBS=ON
            - name: Build shared library
              run: cmake --build build-shared --parallel

    build-macos-cocoa-clang:
        name: Cocoa (macOS, Clang)
        runs-on: macos-latest
        env:
            CFLAGS: -Werror
            MACOSX_DEPLOYMENT_TARGET: 10.8
        steps:
            - uses: actions/checkout@v2

            - name: Configure static library
              run: cmake -S . -B build-static
            - name: Build static library
              run: cmake --build build-static --parallel

            - name: Configure shared library
              run: cmake -S . -B build-shared -D BUILD_SHARED_LIBS=ON
            - name: Build shared library
              run: cmake --build build-shared --parallel

    build-windows-win32-vs2019:
        name: Win32 (Windows, VS2019)
        runs-on: windows-latest
        env:
            CFLAGS: /WX
        steps:
            - uses: actions/checkout@v2

            - name: Configure static library
              run: cmake -S . -B build-static -G "Visual Studio 16 2019"
            - name: Build static library
              run: cmake --build build-static --parallel

            - name: Configure shared library
              run: cmake -S . -B build-shared -G "Visual Studio 16 2019" -D BUILD_SHARED_LIBS=ON
            - name: Build shared library
              run: cmake --build build-shared --parallel