From 6edf40e52120394c9c052bfdfe7f66ff7b955175 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 18 Oct 2023 00:25:29 +0300 Subject: [PATCH] try automatic libretro builds --- .github/build-libretro-zip.sh | 30 +++++++++++++++++ .github/workflows/dev-release.yml | 55 +++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100755 .github/build-libretro-zip.sh create mode 100644 .github/workflows/dev-release.yml diff --git a/.github/build-libretro-zip.sh b/.github/build-libretro-zip.sh new file mode 100755 index 00000000..e84f0455 --- /dev/null +++ b/.github/build-libretro-zip.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -e + +if [[ $# -lt 2 ]]; then + echo "usage: $0 [make_args]" + exit 1 +fi + +if [[ $1 = "arm32" ]]; then + export CC=arm-linux-gnueabihf-gcc + export CXX=arm-linux-gnueabihf-g++ + export LD=arm-linux-gnueabihf-ld + aname=arm32 +elif [[ $1 = "arm64" ]]; then + export CC=aarch64-linux-gnu-gcc + export CXX=aarch64-linux-gnu-g++ + export LD=aarch64-linux-gnu-ld + aname=arm64 +else + echo "unsupported platform $1" + exit 1 +fi +shift +plat=$1 +shift + + +make -f Makefile.libretro platform=$plat "$@" +zip -9 "pcsx_rearmed_libretro_${aname}_${plat}.zip" pcsx_rearmed_libretro.so +make -f Makefile.libretro platform=$plat clean diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml new file mode 100644 index 00000000..c2628b51 --- /dev/null +++ b/.github/workflows/dev-release.yml @@ -0,0 +1,55 @@ +name: "pre-release" + +# this is intended to trigger on notaz/pcsx_rearmed libretro push +# and do nothing on libretro/pcsx_rearmed master push +on: + push: + branches: + - "libretro" + +jobs: + pre-release: + name: "Pre Release" + runs-on: "ubuntu-20.04" + + steps: + - name: Install dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -y make git sed zip + sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross + sudo apt-get install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + - name: Build + env: + MAKEFLAGS: -j$(nproc) + run: | + GITVER=`git rev-parse --short libretro` + .github/build-libretro-zip.sh arm64 CortexA73_G12B GIT_VERSION=${GITVER} + .github/build-libretro-zip.sh arm32 rpi1 GIT_VERSION=${GITVER} + .github/build-libretro-zip.sh arm32 rpi2 GIT_VERSION=${GITVER} + .github/build-libretro-zip.sh arm32 rpi3 GIT_VERSION=${GITVER} + .github/build-libretro-zip.sh arm64 rpi3_64 GIT_VERSION=${GITVER} + .github/build-libretro-zip.sh arm32 rpi4 GIT_VERSION=${GITVER} + .github/build-libretro-zip.sh arm64 rpi4_64 GIT_VERSION=${GITVER} + .github/build-libretro-zip.sh arm32 classic_armv7_a7 GIT_VERSION=${GITVER} + .github/build-libretro-zip.sh arm32 classic_armv8_a35 GIT_VERSION=${GITVER} + #.github/build-libretro-zip.sh arm32 miyoo GIT_VERSION=${GITVER} + - uses: "marvinpinto/action-automatic-releases@v1.2.1" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "libretro-devbuild" + prerelease: true + title: "Development Build" + files: | + pcsx_rearmed_libretro_arm64_CortexA73_G12B.zip + pcsx_rearmed_libretro_arm32_rpi1.zip + pcsx_rearmed_libretro_arm32_rpi2.zip + pcsx_rearmed_libretro_arm32_rpi3.zip + pcsx_rearmed_libretro_arm64_rpi3_64.zip + pcsx_rearmed_libretro_arm32_rpi4.zip + pcsx_rearmed_libretro_arm64_rpi4_64.zip + pcsx_rearmed_libretro_arm32_classic_armv7_a7.zip + pcsx_rearmed_libretro_arm32_classic_armv8_a35.zip -- 2.39.2