diff --git a/.github/workflows/libretro-android.yml b/.github/workflows/libretro-android.yml new file mode 100644 index 000000000..6ac585784 --- /dev/null +++ b/.github/workflows/libretro-android.yml @@ -0,0 +1,39 @@ +name: Build Hatari (libretro) on Android + +on: [push, pull_request] + +env: + core_id: hatari + +jobs: + build-android: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y openjdk-25-jdk wget unzip cmake libsdl2-dev zlib1g-dev + wget https://dl.google.com/android/repository/android-ndk-r29-linux.zip + unzip -q android-ndk-r29-linux.zip + echo "ANDROID_NDK_HOME=$PWD/android-ndk-r29" >> $GITHUB_ENV + + - name: Checkout Hatari (libretro) repo + uses: actions/checkout@v7 + with: + path: ${{ env.core_id }} + submodules: recursive + + - name: Configure + run: | + cd ${{ env.core_id }} + cmake -B build/android-arm64-v8a \ + -DENABLE_LIBRETRO=ON -DENABLE_HATARI=OFF -DENABLE_TOOLS=OFF -DENABLE_STATIC_ZLIB=ON -DENABLE_STATIC_CAPSIMAGE=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DANDROID_ABI=arm64-v8a \ + -DANDROID_PLATFORM=android-26 \ + -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake + + - name: Build + run: | + cd ${{ env.core_id }} + cmake --build build/android-arm64-v8a --parallel diff --git a/.github/workflows/libretro-iOS.yml b/.github/workflows/libretro-iOS.yml new file mode 100644 index 000000000..8b8b579b3 --- /dev/null +++ b/.github/workflows/libretro-iOS.yml @@ -0,0 +1,42 @@ +name: Build Hatari (libretro) on iOS + +on: [push, pull_request] + +env: + core_id: hatari_libretro + +jobs: + build: + runs-on: macos-latest + steps: + - name: Install dependencies + run: | + brew update + brew install cmake mbedtls sdl2 + + - name: Checkout Hatari (libretro) repo + uses: actions/checkout@v7 + with: + path: ${{ env.core_id }} + submodules: recursive + + - name: Configure (iOS arm64) + run: | + cd ${{ env.core_id }} + cmake \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS="" \ + -DCMAKE_CXX_FLAGS="" \ + -DIOS=ON \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \ + -DCMAKE_SYSTEM_NAME=iOS \ + -DCMAKE_SYSTEM_PROCESSOR=arm64 \ + -DCMAKE_OSX_ARCHITECTURES=arm64 \ + -DENABLE_LIBRETRO=ON -DENABLE_HATARI=OFF -DENABLE_TOOLS=OFF -DENABLE_STATIC_ZLIB=ON -DENABLE_STATIC_CAPSIMAGE=ON \ + . -Bbuild/ios-arm64 + + - name: Build + run: | + cd ${{ env.core_id }}/build/ios-arm64 + make -j$(sysctl -n hw.ncpu) diff --git a/.github/workflows/libretro-macOS.yml b/.github/workflows/libretro-macOS.yml new file mode 100644 index 000000000..55c527a45 --- /dev/null +++ b/.github/workflows/libretro-macOS.yml @@ -0,0 +1,44 @@ +name: Build Hatari (libretro) on macOS + +on: [push, pull_request] + +env: + core_id: hatari_libretro + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - name: "macOS x64" + os: macos-latest + ZIP_NAME_SUFFIX: macos_x64 + steps: + - name: Install dependencies + run: | + brew update + brew install cmake \ + mbedtls sdl2 zlib + + - name: Checkout Hatari (libretro) repo + uses: actions/checkout@v7 + with: + path: ${{ env.core_id }} + submodules: recursive + + - name: Configure + run: | + cd ${{ env.core_id }} + mkdir -p build && cd build + cmake .. \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DENABLE_LIBRETRO=ON -DENABLE_HATARI=OFF -DENABLE_TOOLS=OFF -DENABLE_STATIC_ZLIB=ON -DENABLE_STATIC_CAPSIMAGE=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install + + - name: Build + run: | + cd ${{ env.core_id }}/build + make -j$(sysctl -n hw.ncpu) diff --git a/.github/workflows/libretro-mingW.yml b/.github/workflows/libretro-mingW.yml new file mode 100644 index 000000000..92e38712d --- /dev/null +++ b/.github/workflows/libretro-mingW.yml @@ -0,0 +1,47 @@ +name: Build Hatari (libretro) for Windows (MinGW on Ubuntu) + +on: [push, pull_request] + +env: + core_id: hatari_libretro + +jobs: + build-windows-mingw: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt update + sudo apt install -y git cmake pkg-config \ + mingw-w64 libz-mingw-w64-dev + + - name: Checkout Hatari (libretro) repo + uses: actions/checkout@v7 + with: + path: ${{ env.core_id }} + submodules: recursive + + - name: Configure (MinGW cross-compile) + run: | + cd ${{ env.core_id }} + export PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig + export PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/share/pkgconfig + export PKG_CONFIG_SYSROOT_DIR=/usr/x86_64-w64-mingw32 + mkdir -p build && cd build + cmake .. \ + -DENABLE_LIBRETRO=ON -DENABLE_HATARI=OFF -DENABLE_TOOLS=OFF -DENABLE_STATIC_ZLIB=ON -DENABLE_STATIC_CAPSIMAGE=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SYSTEM_NAME=Windows \ + -DCMAKE_SYSTEM_PROCESSOR=x86_64 \ + -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ + -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \ + -DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres \ + -DCMAKE_FIND_ROOT_PATH=/usr/x86_64-w64-mingw32 \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY + + - name: Build + run: | + cd ${{ env.core_id }}/build + make -j$(nproc) diff --git a/.github/workflows/libretro-ubuntu.yml b/.github/workflows/libretro-ubuntu.yml new file mode 100644 index 000000000..c70b9cdc1 --- /dev/null +++ b/.github/workflows/libretro-ubuntu.yml @@ -0,0 +1,42 @@ +name: Build Hatari (libretro) on Ubuntu x64 + +on: [push, pull_request] + +env: + core_id: hatari_libretro + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - name: "Ubuntu x64" + os: ubuntu-latest + ZIP_NAME_SUFFIX: linux_x64 + steps: + - name: Install dependencies + run: | + sudo apt update + sudo apt install -y cmake pkg-config libsdl2-dev + + - name: Checkout Hatari (libretro) repo + uses: actions/checkout@v7 + with: + path: ${{ env.core_id }} + submodules: recursive + + - name: Configure + run: | + cd ${{ env.core_id }} + mkdir -p build && cd build + cmake .. \ + -DENABLE_LIBRETRO=ON -DENABLE_HATARI=OFF -DENABLE_TOOLS=OFF -DENABLE_STATIC_ZLIB=ON -DENABLE_STATIC_CAPSIMAGE=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install + + - name: Build + run: | + cd ${{ env.core_id }}/build + make -j$(nproc)