build.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. jobs:
  11. build-linux-x11-clang:
  12. name: X11 (Linux, Clang)
  13. runs-on: ubuntu-latest
  14. timeout-minutes: 4
  15. env:
  16. CC: clang
  17. CFLAGS: -Werror
  18. steps:
  19. - uses: actions/checkout@v4
  20. - name: Install dependencies
  21. run: |
  22. sudo apt update
  23. sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
  24. - name: Configure static library
  25. run: cmake -S . -B build-static
  26. - name: Build static library
  27. run: cmake --build build-static --parallel
  28. - name: Configure shared library
  29. run: cmake -S . -B build-shared -D BUILD_SHARED_LIBS=ON
  30. - name: Build shared library
  31. run: cmake --build build-shared --parallel
  32. build-linux-wayland-clang:
  33. name: Wayland (Linux, Clang)
  34. runs-on: ubuntu-latest
  35. timeout-minutes: 4
  36. env:
  37. CC: clang
  38. CFLAGS: -Werror
  39. steps:
  40. - uses: actions/checkout@v4
  41. - name: Install dependencies
  42. run: |
  43. sudo apt update
  44. sudo apt install wayland-protocols libwayland-dev libxkbcommon-dev extra-cmake-modules
  45. - name: Configure static library
  46. run: cmake -S . -B build-static -D GLFW_USE_WAYLAND=ON
  47. - name: Build static library
  48. run: cmake --build build-static --parallel
  49. - name: Configure shared library
  50. run: cmake -S . -B build-shared -D GLFW_USE_WAYLAND=ON -D BUILD_SHARED_LIBS=ON
  51. - name: Build shared library
  52. run: cmake --build build-shared --parallel
  53. build-linux-null-clang:
  54. name: Null (Linux, Clang)
  55. runs-on: ubuntu-latest
  56. timeout-minutes: 4
  57. env:
  58. CC: clang
  59. CFLAGS: -Werror
  60. steps:
  61. - uses: actions/checkout@v4
  62. - name: Install dependencies
  63. run: |
  64. sudo apt update
  65. sudo apt install libosmesa6-dev
  66. - name: Configure static library
  67. run: cmake -S . -B build-static -D GLFW_USE_OSMESA=ON
  68. - name: Build static library
  69. run: cmake --build build-static --parallel
  70. - name: Configure shared library
  71. run: cmake -S . -B build-shared -D GLFW_USE_OSMESA=ON -D BUILD_SHARED_LIBS=ON
  72. - name: Build shared library
  73. run: cmake --build build-shared --parallel
  74. build-macos-cocoa-clang:
  75. name: Cocoa (macOS, Clang)
  76. runs-on: macos-latest
  77. timeout-minutes: 4
  78. env:
  79. CFLAGS: -Werror
  80. MACOSX_DEPLOYMENT_TARGET: 10.8
  81. steps:
  82. - uses: actions/checkout@v4
  83. - name: Configure static library
  84. run: cmake -S . -B build-static
  85. - name: Build static library
  86. run: cmake --build build-static --parallel
  87. - name: Configure shared library
  88. run: cmake -S . -B build-shared -D BUILD_SHARED_LIBS=ON
  89. - name: Build shared library
  90. run: cmake --build build-shared --parallel
  91. build-windows-win32-vs2022:
  92. name: Win32 (Windows, VS2022)
  93. runs-on: windows-latest
  94. timeout-minutes: 4
  95. env:
  96. CFLAGS: /WX
  97. steps:
  98. - uses: actions/checkout@v4
  99. - name: Configure static library
  100. run: cmake -S . -B build-static -G "Visual Studio 17 2022"
  101. - name: Build static library
  102. run: cmake --build build-static --parallel
  103. - name: Configure shared library
  104. run: cmake -S . -B build-shared -G "Visual Studio 17 2022" -D BUILD_SHARED_LIBS=ON
  105. - name: Build shared library
  106. run: cmake --build build-shared --parallel