mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Improve coverage of GH build workflow
This adds Null-only and Wayland-only builds, while rearranging jobs by host OS instead of by target platform. Every useful combination of platforms is now being built, except for Null-only with Win32 time and threading. This combination does not compile on VS due to some non-standard array initializers.
This commit is contained in:
parent
40aa77a160
commit
6b39ab0074
109
.github/workflows/build.yml
vendored
109
.github/workflows/build.yml
vendored
@ -9,31 +9,8 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux-x11-clang:
|
build-linux-clang:
|
||||||
name: X11 (Linux, Clang)
|
name: Linux (Clang)
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CC: clang
|
|
||||||
CFLAGS: -Werror
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- 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 -B build-static
|
|
||||||
- name: Build static library
|
|
||||||
run: cmake --build build-static --parallel
|
|
||||||
|
|
||||||
- name: Configure shared library
|
|
||||||
run: cmake -B build-shared -D BUILD_SHARED_LIBS=ON
|
|
||||||
- name: Build shared library
|
|
||||||
run: cmake --build build-shared --parallel
|
|
||||||
|
|
||||||
build-linux-full-clang:
|
|
||||||
name: X11+Wayland (Linux, Clang)
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
CC: clang
|
CC: clang
|
||||||
@ -45,50 +22,76 @@ jobs:
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev wayland-protocols libwayland-dev libxkbcommon-dev
|
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev wayland-protocols libwayland-dev libxkbcommon-dev
|
||||||
|
|
||||||
- name: Configure static library
|
- name: Configure Null shared library
|
||||||
run: cmake -B build-static -D GLFW_BUILD_WAYLAND=ON
|
run: cmake -B build-null-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=OFF -D BUILD_SHARED_LIBS=ON
|
||||||
- name: Build static library
|
- name: Build Null shared library
|
||||||
run: cmake --build build-static --parallel
|
run: cmake --build build-null-shared --parallel
|
||||||
|
|
||||||
- name: Configure shared library
|
- name: Configure X11 shared library
|
||||||
run: cmake -B build-shared -D GLFW_BUILD_WAYLAND=ON -D BUILD_SHARED_LIBS=ON
|
run: cmake -B build-x11-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=ON -D BUILD_SHARED_LIBS=ON
|
||||||
- name: Build shared library
|
- name: Build X11 shared library
|
||||||
run: cmake --build build-shared --parallel
|
run: cmake --build build-x11-shared --parallel
|
||||||
|
|
||||||
build-macos-cocoa-clang:
|
- name: Configure Wayland shared library
|
||||||
name: Cocoa (macOS, Clang)
|
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
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
build-macos-clang:
|
||||||
|
name: macOS (Clang)
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
env:
|
env:
|
||||||
CFLAGS: -Werror
|
CFLAGS: -Werror
|
||||||
MACOSX_DEPLOYMENT_TARGET: 10.8
|
MACOSX_DEPLOYMENT_TARGET: 10.8
|
||||||
|
CMAKE_OSX_ARCHITECTURES: x86_64;arm64
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Configure static library
|
- name: Configure Null shared library
|
||||||
run: cmake -B build-static
|
run: cmake -B build-null-shared -D GLFW_BUILD_COCOA=OFF -D BUILD_SHARED_LIBS=ON
|
||||||
- name: Build static library
|
- name: Build Null shared library
|
||||||
run: cmake --build build-static --parallel
|
run: cmake --build build-null-shared --parallel
|
||||||
|
|
||||||
- name: Configure shared library
|
- name: Configure Cocoa static library
|
||||||
run: cmake -B build-shared -D BUILD_SHARED_LIBS=ON
|
run: cmake -B build-cocoa-static
|
||||||
- name: Build shared library
|
- name: Build Cocoa static library
|
||||||
run: cmake --build build-shared --parallel
|
run: cmake --build build-cocoa-static --parallel
|
||||||
|
|
||||||
build-windows-win32-vs2022:
|
- name: Configure Cocoa shared library
|
||||||
name: Win32 (Windows, VS2022)
|
run: cmake -B build-cocoa-shared -D BUILD_SHARED_LIBS=ON
|
||||||
|
- name: Build Cocoa shared library
|
||||||
|
run: cmake --build build-cocoa-shared --parallel
|
||||||
|
|
||||||
|
build-windows-vs2022:
|
||||||
|
name: Windows (VS2022)
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
env:
|
env:
|
||||||
CFLAGS: /WX
|
CFLAGS: /WX
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Configure static library
|
- name: Configure Win32 shared x86 library
|
||||||
run: cmake -B build-static -G "Visual Studio 17 2022"
|
run: cmake -B build-win32-shared-x86 -G "Visual Studio 17 2022" -A Win32 -D BUILD_SHARED_LIBS=ON
|
||||||
- name: Build static library
|
- name: Build Win32 shared x86 library
|
||||||
run: cmake --build build-static --parallel
|
run: cmake --build build-win32-shared-x86 --parallel
|
||||||
|
|
||||||
- name: Configure shared library
|
- name: Configure Win32 static x64 library
|
||||||
run: cmake -B build-shared -G "Visual Studio 17 2022" -D BUILD_SHARED_LIBS=ON
|
run: cmake -B build-win32-static-x64 -G "Visual Studio 17 2022" -A x64
|
||||||
- name: Build shared library
|
- name: Build Win32 static x64 library
|
||||||
run: cmake --build build-shared --parallel
|
run: cmake --build build-win32-static-x64 --parallel
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user