Update build.yml #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
push: | |
branches: [ ci, master, latest, 3.3-stable ] | |
workflow_dispatch: | |
permissions: | |
statuses: write | |
contents: read | |
jobs: | |
build-linux-clang: | |
strategy: | |
matrix: | |
x11: [false, true] | |
wayland: [false, true] | |
shared: [true, false] | |
name: Linux (Clang) x11=${{ matrix.x11 }} wayland=${{ matrix.wayland }} shared=${{ matrix.shared }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 4 | |
env: | |
CC: clang | |
CFLAGS: -Werror | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libwayland-dev libxkbcommon-dev | |
- name: Configure library | |
run: cmake -B build -D GLFW_BUILD_WAYLAND=${{ matrix.wayland && 'ON' || 'OFF' }} -D GLFW_BUILD_X11=${{ matrix.x11 && 'ON' || 'OFF' }} -D BUILD_SHARED_LIBS=${{ matrix.shared && 'ON' || 'OFF' }} | |
- name: Build library | |
run: cmake --build build --parallel | |
- name: Upload library | |
uses: actions/[email protected] | |
with: | |
name: glfw-linux${{ matrix.shared && '-shared' || '' }}${{ matrix.wayland && '+wayland' || '' }}${{ matrix.x11 && '+x11' || '' }} | |
path: build | |
if-no-files-found: error | |
build-macos-clang: | |
strategy: | |
matrix: | |
cocoa: [false, true] | |
shared: [true, false] | |
name: macOS (Clang) cocoa=${{ matrix.cocoa }} shared=${{ matrix.shared }} | |
runs-on: macos-latest | |
timeout-minutes: 4 | |
env: | |
CFLAGS: -Werror | |
MACOSX_DEPLOYMENT_TARGET: 10.11 | |
CMAKE_OSX_ARCHITECTURES: x86_64;arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure library | |
run: cmake -B build -D GLFW_BUILD_COCOA=${{ matrix.cocoa && 'ON' || 'OFF' }} -D BUILD_SHARED_LIBS=${{ matrix.shared && 'ON' || 'OFF' }} | |
- name: Build library | |
run: cmake --build build --parallel | |
- name: Upload library | |
uses: actions/[email protected] | |
with: | |
name: glfw-macos${{ matrix.shared && '-shared' || '' }}${{ matrix.cocoa && '+cocoa' || '' }} | |
path: build | |
if-no-files-found: error | |
build-windows-vs2022: | |
strategy: | |
matrix: | |
arch: [x32, x64] | |
shared: [true, false] | |
name: Windows (VS2022) arch=${{ matrix.arch }} shared=${{ matrix.shared }} | |
runs-on: windows-latest | |
timeout-minutes: 4 | |
env: | |
CFLAGS: /WX | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure library | |
run: cmake -B build -G "Visual Studio 17 2022" -A ${{ matrix.arch == 'x32' && 'Win32' || 'x64' }} -D BUILD_SHARED_LIBS=${{ matrix.shared && 'ON' || 'OFF' }} | |
- name: Build library | |
run: cmake --build build --parallel | |
- name: Upload library | |
uses: actions/[email protected] | |
with: | |
name: glfw-windows-${{ matrix.arch }}${{ matrix.shared && '-shared' || '' }} | |
path: build | |
if-no-files-found: error |