Update .gitea/workflows/build_sd2psx.yml
This commit is contained in:
parent
e62b49ec9f
commit
bde6844fbd
@ -3,63 +3,22 @@ name: Build Nightly
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
|
||||||
branches:
|
|
||||||
- 'develop'
|
|
||||||
- 'main'
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
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:
|
steps:
|
||||||
- name: Clone Repository
|
- name: Clone Repository
|
||||||
run: |
|
run: |
|
||||||
git clone --recursive --depth=1 https://github.com/sd2psXtd/firmware .
|
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
|
- 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
|
- name: Build
|
||||||
run: |
|
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
|
cmake --build ${{ github.workspace }}/build
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
@ -75,24 +34,12 @@ jobs:
|
|||||||
- name: Download All Artifacts
|
- name: Download All Artifacts
|
||||||
uses: gitea/actions/download-artifact@v2
|
uses: gitea/actions/download-artifact@v2
|
||||||
|
|
||||||
- name: Create Nightly Release
|
- name: Create Release
|
||||||
if: "!startsWith(github.ref, 'refs/tags/')"
|
|
||||||
uses: gitea/actions/create-release@v1
|
uses: gitea/actions/create-release@v1
|
||||||
with:
|
with:
|
||||||
token: "${{ secrets.GITEA_TOKEN }}"
|
token: "${{ secrets.GITEA_TOKEN }}"
|
||||||
prerelease: true
|
prerelease: false
|
||||||
tag_name: "nightly"
|
tag_name: "v6.6.6"
|
||||||
title: "${{ env.SD2PSX_VERSION }}"
|
title: "v6.6.6"
|
||||||
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 }}"
|
|
||||||
files: |
|
files: |
|
||||||
*/*.uf2
|
*/*.uf2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user