Skip to content

Commit 2b4d796

Browse files
committed
Update workflow files.
1 parent 852319e commit 2b4d796

File tree

4 files changed

+102
-7
lines changed

4 files changed

+102
-7
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build raylib Libraries (Android)
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: [ubuntu-latest]
8+
steps:
9+
- uses: actions/[email protected]
10+
with:
11+
repository: 'raysan5/raylib'
12+
path: 'raylib'
13+
ref: '5.5'
14+
submodules: true
15+
16+
- name: Install dependencies on Ubuntu
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y build-essential cmake ninja-build wget
20+
21+
- name: Setup Java
22+
uses: actions/setup-java@v3
23+
with:
24+
distribution: 'temurin'
25+
java-version: 17
26+
27+
- name: Install Android SDK Command-Line Tools
28+
run: |
29+
wget https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip -O android-sdk-tools.zip
30+
unzip android-sdk-tools.zip -d tools
31+
mkdir $HOME/android-sdk/
32+
mkdir $HOME/android-sdk/cmdline-tools/
33+
mkdir $HOME/android-sdk/cmdline-tools/latest/
34+
mv ./tools/cmdline-tools/* $HOME/android-sdk/cmdline-tools/latest/
35+
chmod +x $HOME/android-sdk/cmdline-tools/latest/bin/*
36+
echo "ANDROID_HOME=$HOME/android-sdk" >> $GITHUB_ENV
37+
echo "ANDROID_SDK_ROOT=$HOME/android-sdk" >> $GITHUB_ENV
38+
39+
- name: Accept Android SDK Licenses
40+
run: |
41+
yes | $HOME/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses
42+
- name: Install Specific Android NDK Version 26.3.11579264
43+
run: |
44+
yes | $HOME/android-sdk/cmdline-tools/latest/bin/sdkmanager --install "ndk;26.3.11579264"
45+
echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/26.3.11579264" >> $GITHUB_ENV
46+
echo "PATH=$PATH:$ANDROID_HOME/ndk/26.3.11579264" >> $GITHUB_ENV
47+
48+
- name: Build for arm64-v8a
49+
run: |
50+
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release \
51+
-DCMAKE_SYSTEM_NAME=Android \
52+
-DCMAKE_ANDROID_NDK=$ANDROID_NDK_HOME \
53+
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
54+
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \
55+
-S raylib \
56+
-B raylib/build/arm64-v8a -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
57+
cmake --build raylib/build/arm64-v8a --config Release
58+
59+
- name: Build for x86_64
60+
run: |
61+
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release \
62+
-DCMAKE_SYSTEM_NAME=Android \
63+
-DCMAKE_ANDROID_NDK=$ANDROID_NDK_HOME \
64+
-DCMAKE_ANDROID_ARCH_ABI=x86_64 \
65+
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \
66+
-S raylib \
67+
-B raylib/build/x86_64 -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
68+
cmake --build raylib/build/x86_64 --config Release
69+
70+
71+
- name: Upload Artifacts
72+
uses: actions/[email protected]
73+
with:
74+
name: raylib-android-latest-all-artifacts
75+
path: |
76+
raylib/build/arm64-v8a/raylib/*.so
77+
raylib/build/x86_64/raylib/*.so
78+
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'

.github/workflows/cmake-arm-win.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,17 @@ jobs:
3636
- name: Build raylib
3737
run: cmake --build raylib/build --config Release
3838

39+
- name: Move Windows binaries
40+
if: matrix.os == 'windows-latest'
41+
run: |
42+
mv raylib/build/raylib/Release/*.dll raylib/build/raylib/
43+
3944
- name: Upload Artifacts
4045
uses: actions/[email protected]
4146
with:
42-
name: ${{ matrix.os }}-${{ matrix.arch }}-artifacts
47+
name: raylib-${{ matrix.os }}-${{ matrix.arch }}-artifacts
4348
path: |
44-
raylib/build/raylib/Release/*.dll
49+
raylib/build/raylib/*.dll
4550
raylib/build/raylib/*.so
4651
raylib/build/raylib/*.dylib
4752
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'

.github/workflows/cmake-arm.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ jobs:
88
strategy:
99
matrix:
1010
include:
11-
- os: self-hosted
11+
- os: linux
1212
arch: arm64
13+
cmake-arch: aarch64
14+
runner-label: self-hosted
1315
# - os: windows-latest
1416
# arch: arm64
1517
# triplet: arm64-windows
@@ -39,12 +41,17 @@ jobs:
3941
- name: Build raylib
4042
run: cmake --build raylib/build --config Release
4143

44+
- name: Move Windows binaries
45+
if: matrix.os == 'windows-latest'
46+
run: |
47+
mv raylib/build/raylib/Release/*.dll raylib/build/raylib/
48+
4249
- name: Upload Artifacts
4350
uses: actions/[email protected]
4451
with:
45-
name: ${{ matrix.os }}-${{ matrix.arch }}-artifacts
52+
name: raylib-${{ matrix.os }}-${{ matrix.arch }}-artifacts
4653
path: |
47-
raylib/build/raylib/Release/*.dll
54+
raylib/build/raylib/*.dll
4855
raylib/build/raylib/*.so
4956
raylib/build/raylib/*.dylib
5057
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,17 @@ jobs:
7878
- name: Build raylib
7979
run: cmake --build raylib/build --config Release
8080

81+
- name: Move Windows binaries
82+
if: matrix.os == 'windows-latest'
83+
run: |
84+
mv raylib/build/raylib/Release/*.dll raylib/build/raylib/
85+
8186
- name: Upload Artifacts
8287
uses: actions/[email protected]
8388
with:
84-
name: ${{ matrix.os }}-${{ matrix.arch }}-artifacts
89+
name: raylib-${{ matrix.os }}-${{ matrix.arch }}-artifacts
8590
path: |
86-
raylib/build/raylib/Release/*.dll
91+
raylib/build/raylib/*.dll
8792
raylib/build/raylib/*.so
8893
raylib/build/raylib/*.dylib
8994
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'

0 commit comments

Comments
 (0)