Skip to content

Commit 9df3815

Browse files
committed
Fix cmake file.
1 parent 3e490c7 commit 9df3815

File tree

2 files changed

+91
-94
lines changed

2 files changed

+91
-94
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

.github/workflows/cmake.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build raylib Libraries
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
include:
11+
- os: ubuntu-latest
12+
arch: x86_64
13+
cmake-arch: x64
14+
- os: linux
15+
arch: arm64
16+
cmake-arch: aarch64
17+
runner-label: self-hosted
18+
- os: windows-latest
19+
arch: x86_64
20+
triplet: x64-windows
21+
cmake-arch: x64
22+
- os: windows-latest
23+
arch: x86
24+
triplet: x86-windows
25+
cmake-arch: win32
26+
- os: windows-latest
27+
arch: arm64
28+
triplet: arm64-windows
29+
cmake-arch: arm64
30+
- os: macos-latest
31+
arch: x86_64
32+
cmake-arch: x86_64
33+
- os: macos-latest
34+
arch: arm64
35+
cmake-arch: arm64
36+
37+
steps:
38+
- uses: actions/checkout@v4.1.7
39+
with:
40+
repository: "raysan5/raylib"
41+
path: "raylib"
42+
ref: "5.5"
43+
submodules: true
44+
45+
- name: Install Dependencies on Ubuntu
46+
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest'
47+
run: |
48+
sudo apt-get update
49+
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
50+
51+
- name: Configure Raylib with CMake on Linux
52+
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest'
53+
run: |
54+
cd raylib
55+
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
56+
57+
- name: Configure Raylib with CMake on Windows
58+
if: matrix.os == 'windows-latest' && matrix.arch != 'arm64'
59+
run: |
60+
cd raylib
61+
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
62+
63+
- name: Configure Raylib with CMake on Windows (ARM64)
64+
if: matrix.os == 'windows-latest' && matrix.arch == 'arm64'
65+
run: |
66+
cd raylib
67+
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
68+
69+
- name: Configure Raylib with CMake on macOS
70+
if: matrix.os == 'macos-latest'
71+
run: |
72+
cd raylib
73+
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
74+
75+
- name: Build raylib
76+
run: cmake --build raylib/build --config Release
77+
78+
- name: Move Windows binaries
79+
if: matrix.os == 'windows-latest'
80+
run: |
81+
mv raylib/build/raylib/Release/*.dll raylib/build/raylib/
82+
83+
- name: Upload Artifacts
84+
uses: actions/upload-artifact@v4.3.4
85+
with:
86+
name: raylib-${{ matrix.os }}-${{ matrix.arch }}-artifacts
87+
path: |
88+
raylib/build/raylib/*.dll
89+
raylib/build/raylib/*.so
90+
raylib/build/raylib/*.dylib
91+
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'

0 commit comments

Comments
 (0)