Skip to content

patches: replace old Batman V patches with upstream backport #1347

patches: replace old Batman V patches with upstream backport

patches: replace old Batman V patches with upstream backport #1347

Workflow file for this run

---
name: Build ffmuc firmware
on:
workflow_dispatch:
push:
tags:
- v*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
changed:
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
pull-requests: read # for dorny/paths-filter to read pull requests
runs-on: ubuntu-latest
outputs:
firmware_changed: ${{ steps.filter.outputs.firmware }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: dorny/paths-filter@9d7afb8d214ad99e78fbd4247752c4caed2b6e4c #v4.0.0
id: filter
with:
filters: .github/filters.yml
generate_target_matrix:
needs: [changed]
if: needs.changed.outputs.firmware_changed == 'true' || github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
outputs:
target_json: ${{ steps.set_target.outputs.target }}
build_target_json: ${{ steps.set_target.outputs.build_target }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set target matrix
id: set_target
shell: bash
run: |
target_list=$(cat targets | jq -Rsc '.[:-1] | split("\n")')
echo "target={\"target\": $(echo $target_list)}" >> $GITHUB_OUTPUT
echo "build_target={\"target\": $(echo $target_list)}" >> $GITHUB_OUTPUT
build_firmware:
needs: [changed, generate_target_matrix]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate_target_matrix.outputs.build_target_json) }}
runs-on: ubuntu-24.04
steps:
- name: Maximize build space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install build dependencies
run: |
sudo -E ./scripts/install_build_dependencies.sh
- name: build target ${{ matrix.target }}
id: compile
run: |
git checkout -b patched ${{ github.event.pull_request.head.sha || github.sha }}
make BROKEN=1 GLUON_TARGETS=${{ matrix.target }} BUILD_NUMBER=${{ github.event.pull_request.number && format('pr{0}', github.event.pull_request.number) || github.run_id && format('run{0}', github.run_id) }} V=s
echo "status=success" >> $GITHUB_OUTPUT
- name: Upload firmware ${{ matrix.target }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: steps.compile.outputs.status == 'success'
with:
name: ${{ matrix.target }}_output
path: ./output
# Workaround job so that there is a single job for the required status check
build_firmware_complete:
name: All Targets Build
runs-on: ubuntu-22.04
if: ${{ !cancelled() }}
needs: [build_firmware]
steps:
- name: Error out if there is a failure
if: needs.build_firmware.result != 'skipped' && needs.build_firmware.result != 'success'
run: |
echo "::error title=X Test failed::Build Matrix Result: ${{ needs.build_firmware.result }}"
exit 1
- name: All firmware builds succeeded or skipped
run: echo "::notice title=✓ Test passed or skipped::Build was successful or skipped due to no relevant changes."
create_release:
runs-on: ubuntu-latest
needs:
- build_firmware
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download all artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- name: Display structure of artifacts
run: ls -R
- name: Create tar.gz files
run: |
set -x
for output in *_output; do
tar zcvf "${output}.tar.gz" "${output}"
done
- name: Create Release & Upload Release Assets
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
# Note: If there is no release name specified, releases created in
# the GitHub UI do not trigger a failure and are modified instead.
draft: false
prerelease: false
# Note: Release notes are only auto-generated if the release was
# created by the Github Action and was not created in the Github UI.
generate_release_notes: true
files: |
./*_output.tar.gz