mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 10:05:10 +00:00
Update build.yml
This commit is contained in:
parent
b35641f4a3
commit
4fd231bbd5
196
.github/workflows/build.yml
vendored
196
.github/workflows/build.yml
vendored
@ -1,100 +1,130 @@
|
|||||||
|
|
||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches: [ ci, master, latest, 3.3-stable ]
|
branches: [ ci, master, latest, 3.3-stable ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
statuses: write
|
statuses: write
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux-clang:
|
build-linux-clang:
|
||||||
name: Linux (Clang)
|
name: Linux (Clang)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 4
|
timeout-minutes: 40
|
||||||
|
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 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
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- name: SonarCloud Scan
|
||||||
env:
|
env:
|
||||||
CC: clang
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
CFLAGS: -Werror
|
run: |
|
||||||
steps:
|
mvn sonar:sonar \
|
||||||
- uses: actions/checkout@v4
|
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} \
|
||||||
- name: Install dependencies
|
-Dsonar.organization=${{ secrets.SONAR_ORG }} \
|
||||||
run: |
|
-Dsonar.host.url=https://sonarcloud.io
|
||||||
sudo apt update
|
|
||||||
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libwayland-dev libxkbcommon-dev
|
|
||||||
|
|
||||||
- name: Configure Null shared library
|
build-macos-clang:
|
||||||
run: cmake -B build-null-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=OFF -D BUILD_SHARED_LIBS=ON
|
name: macOS (Clang)
|
||||||
- name: Build Null shared library
|
runs-on: macos-latest
|
||||||
run: cmake --build build-null-shared --parallel
|
timeout-minutes: 40
|
||||||
|
env:
|
||||||
|
CFLAGS: -Werror
|
||||||
|
MACOSX_DEPLOYMENT_TARGET: 10.11
|
||||||
|
CMAKE_OSX_ARCHITECTURES: x86_64;arm64
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Configure X11 shared library
|
- name: Configure Null shared library
|
||||||
run: cmake -B build-x11-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=ON -D BUILD_SHARED_LIBS=ON
|
run: cmake -B build-null-shared -D GLFW_BUILD_COCOA=OFF -D BUILD_SHARED_LIBS=ON
|
||||||
- name: Build X11 shared library
|
- name: Build Null shared library
|
||||||
run: cmake --build build-x11-shared --parallel
|
run: cmake --build build-null-shared --parallel
|
||||||
|
|
||||||
- name: Configure Wayland shared library
|
- name: Configure Cocoa static library
|
||||||
run: cmake -B build-wayland-shared -D GLFW_BUILD_WAYLAND=ON -D GLFW_BUILD_X11=OFF -D BUILD_SHARED_LIBS=ON
|
run: cmake -B build-cocoa-static
|
||||||
- name: Build Wayland shared library
|
- name: Build Cocoa static library
|
||||||
run: cmake --build build-wayland-shared --parallel
|
run: cmake --build build-cocoa-static --parallel
|
||||||
|
|
||||||
- name: Configure Wayland+X11 static library
|
- name: Configure Cocoa shared library
|
||||||
run: cmake -B build-full-static -D GLFW_BUILD_WAYLAND=ON -D GLFW_BUILD_X11=ON
|
run: cmake -B build-cocoa-shared -D BUILD_SHARED_LIBS=ON
|
||||||
- name: Build Wayland+X11 static library
|
- name: Build Cocoa shared library
|
||||||
run: cmake --build build-full-static --parallel
|
run: cmake --build build-cocoa-shared --parallel
|
||||||
|
|
||||||
- name: Configure Wayland+X11 shared library
|
- name: SonarCloud Scan
|
||||||
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
|
|
||||||
timeout-minutes: 4
|
|
||||||
env:
|
env:
|
||||||
CFLAGS: -Werror
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
MACOSX_DEPLOYMENT_TARGET: 10.11
|
run: |
|
||||||
CMAKE_OSX_ARCHITECTURES: x86_64;arm64
|
mvn sonar:sonar \
|
||||||
steps:
|
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} \
|
||||||
- uses: actions/checkout@v4
|
-Dsonar.organization=${{ secrets.SONAR_ORG }} \
|
||||||
|
-Dsonar.host.url=https://sonarcloud.io
|
||||||
|
|
||||||
- name: Configure Null shared library
|
build-windows-vs2022:
|
||||||
run: cmake -B build-null-shared -D GLFW_BUILD_COCOA=OFF -D BUILD_SHARED_LIBS=ON
|
name: Windows (VS2022)
|
||||||
- name: Build Null shared library
|
runs-on: windows-latest
|
||||||
run: cmake --build build-null-shared --parallel
|
timeout-minutes: 40
|
||||||
|
env:
|
||||||
|
CFLAGS: /WX
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Configure Cocoa static library
|
- name: Configure Win32 shared x86 library
|
||||||
run: cmake -B build-cocoa-static
|
run: cmake -B build-win32-shared-x86 -G "Visual Studio 17 2022" -A Win32 -D BUILD_SHARED_LIBS=ON
|
||||||
- name: Build Cocoa static library
|
- name: Build Win32 shared x86 library
|
||||||
run: cmake --build build-cocoa-static --parallel
|
run: cmake --build build-win32-shared-x86 --parallel
|
||||||
|
|
||||||
- name: Configure Cocoa shared library
|
- name: Configure Win32 static x64 library
|
||||||
run: cmake -B build-cocoa-shared -D BUILD_SHARED_LIBS=ON
|
run: cmake -B build-win32-static-x64 -G "Visual Studio 17 2022" -A x64
|
||||||
- name: Build Cocoa shared library
|
- name: Build Win32 static x64 library
|
||||||
run: cmake --build build-cocoa-shared --parallel
|
run: cmake --build build-win32-static-x64 --parallel
|
||||||
|
|
||||||
build-windows-vs2022:
|
- name: Configure Win32 shared x64 library
|
||||||
name: Windows (VS2022)
|
run: cmake -B build-win32-shared-x64 -G "Visual Studio 17 2022" -A x64 -D BUILD_SHARED_LIBS=ON
|
||||||
runs-on: windows-latest
|
- name: Build Win32 shared x64 library
|
||||||
timeout-minutes: 4
|
run: cmake --build build-win32-shared-x64 --parallel
|
||||||
|
|
||||||
|
- name: SonarCloud Scan
|
||||||
env:
|
env:
|
||||||
CFLAGS: /WX
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
steps:
|
run: |
|
||||||
- uses: actions/checkout@v4
|
mvn sonar:sonar \
|
||||||
|
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} \
|
||||||
- name: Configure Win32 shared x86 library
|
-Dsonar.organization=${{ secrets.SONAR_ORG }} \
|
||||||
run: cmake -B build-win32-shared-x86 -G "Visual Studio 17 2022" -A Win32 -D BUILD_SHARED_LIBS=ON
|
-Dsonar.host.url=https://sonarcloud.io
|
||||||
- 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
|
|
||||||
|
|
||||||
- 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