[WIP] Add libretro core support #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Libretro Builds | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build-windows: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Install MSYS2 | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MINGW64 | ||
update: true | ||
- name: Install build tools | ||
run: pacman -S mingw-w64-x86_64-{gcc,pkg-config} make --noconfirm | ||
shell: msys2 {0} | ||
- name: Compile | ||
run: | | ||
make libretro -j$(nproc) | ||
shell: msys2 {0} | ||
working-directory: ${{ github.workspace }} | ||
- name: Upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: noods-libretro-windows | ||
path: | | ||
noods_libretro.dll | ||
noods_libretro.info | ||
build-mac: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Compile | ||
run: | | ||
make libretro -j$(sysctl -n hw.logicalcpu) | ||
- name: Upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: noods-libretro-mac | ||
path: | | ||
noods_libretro.dylib | ||
noods_libretro.info | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install build tools | ||
run: | | ||
sudo apt update | ||
sudo apt install gcc -y | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Compile | ||
run: | | ||
git config --global protocol.file.allow always | ||
make libretro -j$(nproc) | ||
- name: Upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: noods-libretro-linux | ||
path: | | ||
noods_libretro.so | ||
noods_libretro.info | ||
update-release: | ||
runs-on: ubuntu-latest | ||
needs: [build-windows, build-mac, build-linux] | ||
steps: | ||
- name: Get artifacts | ||
uses: actions/download-artifact@v2 | ||
- name: Package artifacts | ||
run: for i in ./*; do zip -r -j ${i}.zip $i; done | ||
- name: Upload release | ||
uses: svenstaro/upload-release-action@v2 | ||
file_glob: true | ||
file: *.zip | ||
tag: release | ||
body: Automatically generated builds | ||
overwrite: true |