Skip to content

Build raylib Libraries #1

Build raylib Libraries

Build raylib Libraries #1

Workflow file for this run

name: Build raylib Libraries
on: [workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64
cmake-arch: x64
- os: linux
arch: arm64
cmake-arch: aarch64
runner-label: self-hosted
- os: windows-latest
arch: x86_64
triplet: x64-windows
cmake-arch: x64
- os: windows-latest
arch: x86
triplet: x86-windows
cmake-arch: win32
- os: windows-latest
arch: arm64
triplet: arm64-windows
cmake-arch: arm64
- os: macos-latest
arch: x86_64
cmake-arch: x86_64
- os: macos-latest
arch: arm64
cmake-arch: arm64
steps:
- uses: actions/[email protected]
with:
repository: "raysan5/raylib"
path: "raylib"
ref: "5.5"
submodules: true
- name: Install Dependencies on Ubuntu
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev libwayland-dev libxkbcommon-dev
- name: Configure Raylib with CMake on Linux
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest'
run: |
cd raylib
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
- name: Configure Raylib with CMake on Windows
if: matrix.os == 'windows-latest' && matrix.arch != 'arm64'
run: |
cd raylib
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
- name: Configure Raylib with CMake on Windows (ARM64)
if: matrix.os == 'windows-latest' && matrix.arch == 'arm64'
run: |
cd raylib
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF -DCMAKE_SYSTEM_VERSION=10.0.26100.0
- name: Configure Raylib with CMake on macOS
if: matrix.os == 'macos-latest'
run: |
cd raylib
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
- name: Build raylib
run: cmake --build raylib/build --config Release
- name: Move Windows binaries
if: matrix.os == 'windows-latest'
run: |
mv raylib/build/raylib/Release/*.dll raylib/build/raylib/
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: raylib-${{ matrix.os }}-${{ matrix.arch }}-artifacts
path: |
raylib/build/raylib/*.dll
raylib/build/raylib/*.so
raylib/build/raylib/*.dylib
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'