Update .gitea/workflows/build_sd2psx.yml

This commit is contained in:
Sthope 2025-03-16 13:03:12 +01:00
parent e62b49ec9f
commit bde6844fbd

View File

@ -3,63 +3,22 @@ name: Build Nightly
on:
push:
tags:
- '*'
branches:
- 'develop'
- 'main'
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target: [SD2PSX, SD2PSXlite, PMC+, PMCZero, PSXMemCard]
debug: [ON, OFF]
include:
- debug: ON
ext: -debug.uf2
delay: 3
- debug: OFF
ext: .uf2
delay: 0
- target: SD2PSX
filename: sd2psx
- target: SD2PSXlite
filename: sd2psxlite
- target: PMC+
filename: pmc+
- target: PMCZero
filename: pmczero
- target: PSXMemCard
filename: psxmemcard
steps:
- name: Clone Repository
run: |
git clone --recursive --depth=1 https://github.com/sd2psXtd/firmware .
git fetch origin --tags --force
- name: Set Version
run: |
TAG=$(git describe --tags --exact-match HEAD --exclude=latest --exclude=nightly) || true
if [ "$TAG" ]; then
echo "SD2PSX_VERSION=${TAG}" >> $GITHUB_ENV
echo "SD2PSX_RLS_TAG=latest" >> $GITHUB_ENV
echo "${TAG}"
else
echo "SD2PSX_VERSION=nightly-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "SD2PSX_RLS_TAG=nightly" >> $GITHUB_ENV
echo "nightly"
fi
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib clangd git python3-venv
run: apt update && apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib clangd git python3-venv
- name: Build
run: |
cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DDEBUG_USB_UART:BOOL=${{ matrix.debug }} -DVARIANT:STRING=${{ matrix.target }} -DDEBUG_STARTUP_DELAY=${{ matrix.delay }} -G "Unix Makefiles"
cmake -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDEBUG_USB_UART:BOOL=OFF -DVARIANT:STRING=SD2PSX -DDEBUG_STARTUP_DELAY=0 -G "Unix Makefiles"
cmake --build ${{ github.workspace }}/build
- name: Upload Artifacts
@ -75,24 +34,12 @@ jobs:
- name: Download All Artifacts
uses: gitea/actions/download-artifact@v2
- name: Create Nightly Release
if: "!startsWith(github.ref, 'refs/tags/')"
- name: Create Release
uses: gitea/actions/create-release@v1
with:
token: "${{ secrets.GITEA_TOKEN }}"
prerelease: true
tag_name: "nightly"
title: "${{ env.SD2PSX_VERSION }}"
files: |
*/*.uf2
- name: Create Tagged Release
if: "startsWith(github.ref, 'refs/tags/')"
uses: gitea/actions/create-release@v1
with:
token: "${{ secrets.GITEA_TOKEN }}"
prerelease: "${{ contains(github.ref, '-rc') || contains(github.ref, '-beta') }}"
tag_name: "${{ github.ref_name }}"
title: "${{ env.SD2PSX_VERSION }}"
prerelease: false
tag_name: "v6.6.6"
title: "v6.6.6"
files: |
*/*.uf2