mirror of
https://github.com/spicyjpeg/573in1.git
synced 2025-02-02 20:47:17 +01:00
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
# 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:
|
|
path: cart-tool
|
|
|
|
- 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
|
|
sudo pip3 install -r cart-tool/tools/requirements.txt
|
|
|
|
- name: Build GCC toolchain
|
|
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
|
run: |
|
|
cart-tool/.github/scripts/buildToolchain.sh gcc-mipsel-none-elf mipsel-none-elf
|
|
|
|
- name: Build project
|
|
run: |
|
|
cart-tool/.github/scripts/buildRelease.sh
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build
|
|
if-no-files-found: error
|
|
path: cart-tool-*/**
|
|
|
|
- name: Publish release
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
fail_on_unmatched_files: true
|
|
files: cart-tool-*.zip
|