Skip to content

Commit 86d366b

Browse files
cscd98warmenhoven
authored andcommitted
libretro: add ubuntu, apple, windows, android builders to test compilation
1 parent 7e6d0b3 commit 86d366b

6 files changed

Lines changed: 249 additions & 0 deletions
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build Dolphin (libretro) on Android
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
core_id: dolphin_libretro
7+
8+
jobs:
9+
build-android:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Install dependencies
13+
run: |
14+
sudo apt-get update
15+
sudo apt-get install -y openjdk-17-jdk wget unzip cmake ninja-build
16+
wget https://dl.google.com/android/repository/android-ndk-r26d-linux.zip
17+
unzip -q android-ndk-r26d-linux.zip
18+
echo "ANDROID_NDK_HOME=$PWD/android-ndk-r26d" >> $GITHUB_ENV
19+
20+
- name: Checkout Dolphin (libretro) repo
21+
uses: actions/checkout@v6
22+
with:
23+
path: ${{ env.core_id }}
24+
submodules: recursive
25+
26+
- name: Configure
27+
run: |
28+
cd ${{ env.core_id }}
29+
cmake -B build/android-arm64-v8a \
30+
-DLIBRETRO=ON \
31+
-DCMAKE_BUILD_TYPE=Release \
32+
-DANDROID_ABI=arm64-v8a \
33+
-DANDROID_PLATFORM=android-26 \
34+
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
35+
-G Ninja
36+
37+
- name: Build
38+
run: |
39+
cd ${{ env.core_id }}/build/android-arm64-v8a
40+
ninja -j$(nproc)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build Dolphin (libretro) on iOS
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
core_id: dolphin_libretro
7+
8+
jobs:
9+
build:
10+
runs-on: macos-latest
11+
steps:
12+
- name: Install dependencies
13+
run: |
14+
brew update
15+
brew install cmake mbedtls zlib
16+
17+
- name: Checkout Dolphin (libretro) repo
18+
uses: actions/checkout@v6
19+
with:
20+
path: ${{ env.core_id }}
21+
submodules: recursive
22+
23+
- name: Configure (iOS arm64)
24+
run: |
25+
cd ${{ env.core_id }}
26+
cmake \
27+
-DCMAKE_BUILD_TYPE=Release \
28+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
29+
-DCMAKE_C_FLAGS="" \
30+
-DCMAKE_CXX_FLAGS="" \
31+
-DIOS=ON \
32+
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
33+
-DCMAKE_SYSTEM_NAME=iOS \
34+
-DCMAKE_SYSTEM_PROCESSOR=arm64 \
35+
-DCMAKE_OSX_ARCHITECTURES=arm64 \
36+
-DLIBRETRO=ON \
37+
. -Bbuild/ios-arm64
38+
39+
- name: Build
40+
run: |
41+
cd ${{ env.core_id }}/build/ios-arm64
42+
make -j$(sysctl -n hw.ncpu)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build Dolphin (libretro) on macOS
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
core_id: dolphin_libretro
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- name: "macOS x64"
16+
os: macos-latest
17+
ZIP_NAME_SUFFIX: macos_x64
18+
steps:
19+
- name: Install dependencies
20+
run: |
21+
brew update
22+
brew install cmake \
23+
mbedtls zlib
24+
25+
- name: Checkout Dolphin (libretro) repo
26+
uses: actions/checkout@v6
27+
with:
28+
path: ${{ env.core_id }}
29+
submodules: recursive
30+
31+
- name: Configure
32+
run: |
33+
cd ${{ env.core_id }}
34+
mkdir -p build && cd build
35+
cmake .. \
36+
-DLIBRETRO=ON \
37+
-DCMAKE_BUILD_TYPE=Release \
38+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
39+
40+
- name: Build
41+
run: |
42+
cd ${{ env.core_id }}/build
43+
make -j$(sysctl -n hw.ncpu)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build Dolphin (libretro) on Ubuntu x64
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
core_id: dolphin_libretro
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- name: "Ubuntu x64"
16+
os: ubuntu-latest
17+
ZIP_NAME_SUFFIX: linux_x64
18+
steps:
19+
- name: Install dependencies
20+
run: |
21+
sudo apt update
22+
sudo apt install -y cmake ninja-build pkg-config \
23+
libasound2-dev \
24+
libx11-dev libxi-dev libxrandr-dev libudev-dev libevdev-dev \
25+
libegl1-mesa-dev libgl1-mesa-dev \
26+
libmbedtls-dev libcurl4-openssl-dev zlib1g-dev
27+
28+
- name: Checkout Dolphin (libretro) repo
29+
uses: actions/checkout@v6
30+
with:
31+
path: ${{ env.core_id }}
32+
submodules: recursive
33+
34+
- name: Configure
35+
run: |
36+
cd ${{ env.core_id }}
37+
mkdir -p build && cd build
38+
cmake .. \
39+
-DLIBRETRO=ON \
40+
-DCMAKE_BUILD_TYPE=Release \
41+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
42+
43+
- name: Build
44+
run: |
45+
cd ${{ env.core_id }}/build
46+
make -j$(nproc)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build Dolphin (libretro) for Windows (MinGW on Ubuntu)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
core_id: dolphin_libretro
7+
8+
jobs:
9+
build-windows-mingw:
10+
runs-on: ubuntu-latest
11+
container: ubuntu:25.10
12+
steps:
13+
- name: Install dependencies
14+
run: |
15+
apt update
16+
apt install -y git cmake ninja-build pkg-config \
17+
mingw-w64
18+
19+
- name: Checkout Dolphin (libretro) repo
20+
uses: actions/checkout@v6
21+
with:
22+
path: ${{ env.core_id }}
23+
submodules: recursive
24+
25+
- name: Configure (MinGW cross-compile)
26+
run: |
27+
cd ${{ env.core_id }}
28+
export PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig
29+
export PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/share/pkgconfig
30+
export PKG_CONFIG_SYSROOT_DIR=/usr/x86_64-w64-mingw32
31+
mkdir -p build && cd build
32+
cmake .. \
33+
-DLIBRETRO=ON \
34+
-DCMAKE_BUILD_TYPE=Release \
35+
-DCMAKE_SYSTEM_NAME=Windows \
36+
-DCMAKE_SYSTEM_PROCESSOR=x86_64 \
37+
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
38+
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
39+
-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres \
40+
-DCMAKE_FIND_ROOT_PATH=/usr/x86_64-w64-mingw32 \
41+
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
42+
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
43+
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
44+
-G Ninja
45+
46+
- name: Build
47+
run: |
48+
cd ${{ env.core_id }}/build
49+
ninja -j$(nproc)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build Dolphin (libretro) on Windows (MSVC)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
core_id: dolphin_libretro
7+
8+
jobs:
9+
build-windows:
10+
runs-on: windows-latest
11+
steps:
12+
- name: Install dependencies
13+
run: |
14+
choco install cmake ninja git
15+
- name: Checkout Dolphin (libretro) repo
16+
uses: actions/checkout@v6
17+
with:
18+
path: ${{ env.core_id }}
19+
submodules: recursive
20+
21+
- name: Configure (MSVC)
22+
run: |
23+
cd ${{ env.core_id }}
24+
mkdir build && cd build
25+
cmake .. -DLIBRETRO=ON -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -A x64
26+
27+
- name: Build
28+
run: |
29+
cmake --build ${{ env.core_id }}/build --config Release --parallel

0 commit comments

Comments
 (0)