Skip to content

Commit bdd3d75

Browse files
authored
Create cmake-arm.yml
1 parent 480c825 commit bdd3d75

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/cmake-arm.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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: arm64
13+
- os: windows-latest
14+
arch: arm64
15+
triplet: arm64-windows
16+
arch-cmake: arm64
17+
18+
steps:
19+
- uses: actions/checkout@v4.1.7
20+
with:
21+
repository: 'raysan5/raylib'
22+
path: 'raylib'
23+
ref: '5.0'
24+
submodules: true
25+
26+
- name: Install Dependencies on Ubuntu
27+
if: matrix.os == 'ubuntu-latest'
28+
run: |
29+
sudo apt-get update
30+
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
31+
32+
- name: Install Cross-Compilation Tools for ARM64
33+
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64'
34+
run: |
35+
sudo dpkg --add-architecture arm64
36+
sudo apt-get update
37+
sudo apt-get install -y libasound2-dev:arm64 libx11-dev:arm64 libxrandr-dev:arm64 libxi-dev:arm64 libgl1-mesa-dev:arm64 libglu1-mesa-dev:arm64 libxcursor-dev:arm64 libxinerama-dev:arm64 libwayland-dev:arm64 libxkbcommon-dev:arm64
38+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
39+
40+
- name: Configure Raylib with CMake for ARM64 on Linux
41+
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64'
42+
run: |
43+
cd raylib
44+
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
45+
46+
- name: Configure Raylib with CMake on Windows
47+
if: matrix.os == 'windows-latest'
48+
run: |
49+
cd raylib
50+
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.arch-cmake }} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
51+
52+
- name: Configure Raylib with CMake on macOS
53+
if: matrix.os == 'macos-latest'
54+
run: |
55+
cd raylib
56+
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch-cmake }} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
57+
58+
- name: Configure Raylib with CMake on Linux (x86_64)
59+
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64'
60+
run: |
61+
cd raylib
62+
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
63+
64+
- name: Build raylib
65+
run: cmake --build raylib/build --config Release
66+
67+
- name: Upload Artifacts
68+
uses: actions/upload-artifact@v4.3.4
69+
with:
70+
name: ${{ matrix.os }}-${{ matrix.arch }}-artifacts
71+
path: |
72+
raylib/build/raylib/Release/*.dll
73+
raylib/build/raylib/*.so
74+
raylib/build/raylib/*.dylib
75+
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'

0 commit comments

Comments
 (0)