2021-06-07 20:21:23 +00:00
|
|
|
name: Build
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
2021-06-09 14:48:34 +00:00
|
|
|
branches: [ ci, master, latest, 3.3-stable ]
|
2023-01-26 17:41:46 +00:00
|
|
|
workflow_dispatch:
|
2021-06-07 20:21:23 +00:00
|
|
|
permissions:
|
|
|
|
statuses: write
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
2023-11-30 18:54:38 +00:00
|
|
|
build-linux-clang:
|
|
|
|
name: Linux (Clang)
|
2021-06-07 20:21:23 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-01-14 23:23:20 +00:00
|
|
|
timeout-minutes: 4
|
2021-06-09 14:44:45 +00:00
|
|
|
env:
|
|
|
|
CC: clang
|
|
|
|
CFLAGS: -Werror
|
2021-06-07 20:21:23 +00:00
|
|
|
steps:
|
2023-12-16 03:24:48 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-06-07 20:21:23 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
2023-12-05 22:03:25 +00:00
|
|
|
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libwayland-dev libxkbcommon-dev
|
2021-06-07 20:21:23 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
- name: Configure Null shared library
|
|
|
|
run: cmake -B build-null-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=OFF -D BUILD_SHARED_LIBS=ON
|
|
|
|
- name: Build Null shared library
|
|
|
|
run: cmake --build build-null-shared --parallel
|
2021-06-07 20:21:23 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
- name: Configure X11 shared library
|
|
|
|
run: cmake -B build-x11-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=ON -D BUILD_SHARED_LIBS=ON
|
|
|
|
- name: Build X11 shared library
|
|
|
|
run: cmake --build build-x11-shared --parallel
|
2021-06-07 20:21:23 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
- name: Configure Wayland shared library
|
|
|
|
run: cmake -B build-wayland-shared -D GLFW_BUILD_WAYLAND=ON -D GLFW_BUILD_X11=OFF -D BUILD_SHARED_LIBS=ON
|
|
|
|
- name: Build Wayland shared library
|
|
|
|
run: cmake --build build-wayland-shared --parallel
|
2021-06-07 20:21:23 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
- name: Configure Wayland+X11 static library
|
|
|
|
run: cmake -B build-full-static -D GLFW_BUILD_WAYLAND=ON -D GLFW_BUILD_X11=ON
|
|
|
|
- name: Build Wayland+X11 static library
|
|
|
|
run: cmake --build build-full-static --parallel
|
2021-06-07 20:21:23 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
- name: Configure Wayland+X11 shared library
|
|
|
|
run: cmake -B build-full-shared -D GLFW_BUILD_WAYLAND=ON -D BUILD_SHARED_LIBS=ON -D GLFW_BUILD_X11=ON
|
|
|
|
- name: Build Wayland+X11 shared library
|
|
|
|
run: cmake --build build-full-shared --parallel
|
2021-06-07 20:21:23 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
build-macos-clang:
|
|
|
|
name: macOS (Clang)
|
2021-06-07 20:21:23 +00:00
|
|
|
runs-on: macos-latest
|
2024-01-14 23:23:20 +00:00
|
|
|
timeout-minutes: 4
|
2021-06-07 20:21:23 +00:00
|
|
|
env:
|
2021-06-09 14:44:45 +00:00
|
|
|
CFLAGS: -Werror
|
2021-06-07 20:21:23 +00:00
|
|
|
MACOSX_DEPLOYMENT_TARGET: 10.8
|
2023-11-30 18:54:38 +00:00
|
|
|
CMAKE_OSX_ARCHITECTURES: x86_64;arm64
|
2021-06-07 20:21:23 +00:00
|
|
|
steps:
|
2023-12-16 03:24:48 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-06-07 20:21:23 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
- name: Configure Null shared library
|
|
|
|
run: cmake -B build-null-shared -D GLFW_BUILD_COCOA=OFF -D BUILD_SHARED_LIBS=ON
|
|
|
|
- name: Build Null shared library
|
|
|
|
run: cmake --build build-null-shared --parallel
|
|
|
|
|
|
|
|
- name: Configure Cocoa static library
|
|
|
|
run: cmake -B build-cocoa-static
|
|
|
|
- name: Build Cocoa static library
|
|
|
|
run: cmake --build build-cocoa-static --parallel
|
2021-06-07 20:21:23 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
- name: Configure Cocoa shared library
|
|
|
|
run: cmake -B build-cocoa-shared -D BUILD_SHARED_LIBS=ON
|
|
|
|
- name: Build Cocoa shared library
|
|
|
|
run: cmake --build build-cocoa-shared --parallel
|
2021-06-07 20:21:23 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
build-windows-vs2022:
|
|
|
|
name: Windows (VS2022)
|
2021-06-09 14:44:45 +00:00
|
|
|
runs-on: windows-latest
|
2024-01-14 23:23:20 +00:00
|
|
|
timeout-minutes: 4
|
2021-06-09 14:44:45 +00:00
|
|
|
env:
|
|
|
|
CFLAGS: /WX
|
|
|
|
steps:
|
2023-12-16 03:24:48 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-06-09 14:44:45 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
- name: Configure Win32 shared x86 library
|
|
|
|
run: cmake -B build-win32-shared-x86 -G "Visual Studio 17 2022" -A Win32 -D BUILD_SHARED_LIBS=ON
|
|
|
|
- name: Build Win32 shared x86 library
|
|
|
|
run: cmake --build build-win32-shared-x86 --parallel
|
|
|
|
|
|
|
|
- name: Configure Win32 static x64 library
|
|
|
|
run: cmake -B build-win32-static-x64 -G "Visual Studio 17 2022" -A x64
|
|
|
|
- name: Build Win32 static x64 library
|
|
|
|
run: cmake --build build-win32-static-x64 --parallel
|
2021-06-09 14:44:45 +00:00
|
|
|
|
2023-11-30 18:54:38 +00:00
|
|
|
- name: Configure Win32 shared x64 library
|
|
|
|
run: cmake -B build-win32-shared-x64 -G "Visual Studio 17 2022" -A x64 -D BUILD_SHARED_LIBS=ON
|
|
|
|
- name: Build Win32 shared x64 library
|
|
|
|
run: cmake --build build-win32-shared-x64 --parallel
|
2021-06-09 14:44:45 +00:00
|
|
|
|