|
| 1 | +name: Build |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + push: |
| 5 | + branches: [ ci, master, latest, 3.3-stable ] |
| 6 | + workflow_dispatch: |
| 7 | +permissions: |
| 8 | + statuses: write |
| 9 | + contents: read |
| 10 | + |
| 11 | +jobs: |
| 12 | + build-linux-clang: |
| 13 | + name: Linux (Clang) |
| 14 | + runs-on: ubuntu-latest |
| 15 | + timeout-minutes: 4 |
| 16 | + env: |
| 17 | + CC: clang |
| 18 | + CFLAGS: -Werror |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - name: Install dependencies |
| 22 | + run: | |
| 23 | + sudo apt update |
| 24 | + sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libwayland-dev libxkbcommon-dev |
| 25 | +
|
| 26 | + - name: Configure Null shared library |
| 27 | + run: cmake -B build-null-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=OFF -D BUILD_SHARED_LIBS=ON |
| 28 | + - name: Build Null shared library |
| 29 | + run: cmake --build build-null-shared --parallel |
| 30 | + |
| 31 | + - name: Configure X11 shared library |
| 32 | + run: cmake -B build-x11-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=ON -D BUILD_SHARED_LIBS=ON |
| 33 | + - name: Build X11 shared library |
| 34 | + run: cmake --build build-x11-shared --parallel |
| 35 | + |
| 36 | + - name: Configure Wayland shared library |
| 37 | + run: cmake -B build-wayland-shared -D GLFW_BUILD_WAYLAND=ON -D GLFW_BUILD_X11=OFF -D BUILD_SHARED_LIBS=ON |
| 38 | + - name: Build Wayland shared library |
| 39 | + run: cmake --build build-wayland-shared --parallel |
| 40 | + |
| 41 | + - name: Configure Wayland+X11 static library |
| 42 | + run: cmake -B build-full-static -D GLFW_BUILD_WAYLAND=ON -D GLFW_BUILD_X11=ON |
| 43 | + - name: Build Wayland+X11 static library |
| 44 | + run: cmake --build build-full-static --parallel |
| 45 | + |
| 46 | + - name: Configure Wayland+X11 shared library |
| 47 | + run: cmake -B build-full-shared -D GLFW_BUILD_WAYLAND=ON -D BUILD_SHARED_LIBS=ON -D GLFW_BUILD_X11=ON |
| 48 | + - name: Build Wayland+X11 shared library |
| 49 | + run: cmake --build build-full-shared --parallel |
| 50 | + |
| 51 | + build-macos-clang: |
| 52 | + name: macOS (Clang) |
| 53 | + runs-on: macos-latest |
| 54 | + timeout-minutes: 4 |
| 55 | + env: |
| 56 | + CFLAGS: -Werror |
| 57 | + MACOSX_DEPLOYMENT_TARGET: 10.8 |
| 58 | + CMAKE_OSX_ARCHITECTURES: x86_64;arm64 |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v4 |
| 61 | + |
| 62 | + - name: Configure Null shared library |
| 63 | + run: cmake -B build-null-shared -D GLFW_BUILD_COCOA=OFF -D BUILD_SHARED_LIBS=ON |
| 64 | + - name: Build Null shared library |
| 65 | + run: cmake --build build-null-shared --parallel |
| 66 | + |
| 67 | + - name: Configure Cocoa static library |
| 68 | + run: cmake -B build-cocoa-static |
| 69 | + - name: Build Cocoa static library |
| 70 | + run: cmake --build build-cocoa-static --parallel |
| 71 | + |
| 72 | + - name: Configure Cocoa shared library |
| 73 | + run: cmake -B build-cocoa-shared -D BUILD_SHARED_LIBS=ON |
| 74 | + - name: Build Cocoa shared library |
| 75 | + run: cmake --build build-cocoa-shared --parallel |
| 76 | + |
| 77 | + build-windows-vs2022: |
| 78 | + name: Windows (VS2022) |
| 79 | + runs-on: windows-latest |
| 80 | + timeout-minutes: 4 |
| 81 | + env: |
| 82 | + CFLAGS: /WX |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v4 |
| 85 | + |
| 86 | + - name: Configure Win32 shared x86 library |
| 87 | + run: cmake -B build-win32-shared-x86 -G "Visual Studio 17 2022" -A Win32 -D BUILD_SHARED_LIBS=ON |
| 88 | + - name: Build Win32 shared x86 library |
| 89 | + run: cmake --build build-win32-shared-x86 --parallel |
| 90 | + |
| 91 | + - name: Configure Win32 static x64 library |
| 92 | + run: cmake -B build-win32-static-x64 -G "Visual Studio 17 2022" -A x64 |
| 93 | + - name: Build Win32 static x64 library |
| 94 | + run: cmake --build build-win32-static-x64 --parallel |
| 95 | + |
| 96 | + - name: Configure Win32 shared x64 library |
| 97 | + run: cmake -B build-win32-shared-x64 -G "Visual Studio 17 2022" -A x64 -D BUILD_SHARED_LIBS=ON |
| 98 | + - name: Build Win32 shared x64 library |
| 99 | + run: cmake --build build-win32-shared-x64 --parallel |
| 100 | + |
0 commit comments