2024-05-29 21:16:24 +02:00
|
|
|
# The GCC toolchain is stored in the GitHub Actions cache after being built. To
|
|
|
|
# minimize build times, the toolchain build step is skipped if there is a cached
|
|
|
|
# copy of the toolchain that has not expired.
|
|
|
|
|
|
|
|
name: Build
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Run build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Initialize toolchain cache
|
|
|
|
id: cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
key: toolchain
|
|
|
|
path: gcc-mipsel-none-elf
|
|
|
|
|
|
|
|
- name: Fetch repo contents
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
2024-06-27 09:52:57 +02:00
|
|
|
path: 573in1
|
2024-05-29 21:16:24 +02:00
|
|
|
|
|
|
|
- name: Fetch OpenBIOS repo contents
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: pcsx-redux/nugget
|
|
|
|
path: nugget
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install prerequisites
|
|
|
|
run: |
|
|
|
|
sudo apt-get update -y
|
|
|
|
sudo apt-get install -y --no-install-recommends ninja-build mame-tools
|
2024-06-27 09:52:57 +02:00
|
|
|
sudo pip3 install -r 573in1/tools/requirements.txt
|
2024-05-29 21:16:24 +02:00
|
|
|
|
|
|
|
- name: Build GCC toolchain
|
|
|
|
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
|
|
|
run: |
|
2024-06-27 09:52:57 +02:00
|
|
|
573in1/.github/scripts/buildToolchain.sh gcc-mipsel-none-elf mipsel-none-elf
|
2024-05-29 21:16:24 +02:00
|
|
|
|
|
|
|
- name: Build project
|
|
|
|
run: |
|
2024-06-27 09:52:57 +02:00
|
|
|
573in1/.github/scripts/buildRelease.sh
|
2024-05-29 21:16:24 +02:00
|
|
|
|
|
|
|
- name: Upload build artifacts
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: build
|
|
|
|
if-no-files-found: error
|
2024-06-27 09:52:57 +02:00
|
|
|
path: 573in1-*.zip
|
2024-05-29 21:16:24 +02:00
|
|
|
|
|
|
|
- name: Publish release
|
|
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
fail_on_unmatched_files: true
|
2024-06-27 09:52:57 +02:00
|
|
|
files: 573in1-*.zip
|