Skip to content

Commit 6bf927b

Browse files
authored
Create cmake-multi-platform.yml
1 parent 4d387ea commit 6bf927b

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
- os: ubuntu-latest
14+
arch: arm64
15+
- os: windows-latest
16+
arch: x86_64
17+
triplet: x64-windows
18+
arch-cmake: x64
19+
- os: windows-latest
20+
arch: x86
21+
triplet: x86-windows
22+
arch-cmake: win32
23+
- os: windows-latest
24+
arch: arm64
25+
triplet: arm64-windows
26+
arch-cmake: arm64
27+
- os: macos-latest
28+
arch: x86_64
29+
- os: macos-latest
30+
arch: arm64
31+
32+
steps:
33+
- uses: actions/checkout@v4.1.7
34+
with:
35+
repository: 'raysan5/raylib'
36+
path: 'raylib'
37+
ref: '5.0'
38+
submodules: true
39+
40+
- name: Install Dependencies on Ubuntu
41+
if: matrix.os == 'ubuntu-latest'
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y build-essential cmake
45+
46+
- name: Configure libssh2 with CMake
47+
if: matrix.os != 'windows-latest'
48+
run: |
49+
cd raylib
50+
cmake -S ./ -B ./build -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
51+
52+
- name: Build raylib
53+
run: cmake --build raylib/build --config Release
54+
55+
- name: Upload Artifacts
56+
uses: actions/upload-artifact@v4.3.4
57+
with:
58+
name: ${{ matrix.os }}-${{ matrix.arch }}-artifacts
59+
path: |
60+
raylib/build/raylib/Release/*.dll
61+
raylib/build/raylib/*.so
62+
raylib/build/raylib/*.dylib
63+
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'

0 commit comments

Comments
 (0)