From 1e98ebb41e17201386e605e496dd5918c356f560 Mon Sep 17 00:00:00 2001 From: Sthope Date: Mon, 17 Mar 2025 19:28:35 +0100 Subject: [PATCH] Add .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..e04aa71 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,73 @@ +name: build +on: + push: + schedule: + - cron: "0 6 * * *" + +jobs: + build: + strategy: + matrix: + hw_version: [hw1] + br_config: + [playstation] + + runs-on: ubuntu-latest + + container: + image: ghcr.io/darthcloud/idf-blueretro:v5.5.0_2024-12-02 + outputs: + br_version: ${{ env.br_version }} + steps: + + - name: Clone Repository + run: | + git clone --recursive https://github.com/darthcloud/BlueRetro.git ${{ github.workspace }} + cd ${{ github.workspace }} + echo "BLUERETRO_VERSION=${GITHUB_VERSION}" >> $GITEA_ENV + echo ${BLUERETRO_VERSION} + + - name: Build with ESP-IDF + shell: bash + run: | + . $IDF_PATH/export.sh + echo "br_version=$(git describe --always --tags --dirty)" >> $GITHUB_ENV + rm -fr build + echo "$(git describe --always --tags --dirty) ${{ matrix.hw_version }} ${{ matrix.br_config }}" | cut -c -31 > version.txt + cat version.txt + cp configs/${{ matrix.hw_version }}/${{ matrix.br_config }} sdkconfig + BR_HW=_${{ matrix.hw_version }} BR_SYS=_${{ matrix.br_config }} idf.py reconfigure build + + - name: Copy OTA initial binary + run: | + mkdir -p build/ota + mv build/ota_data_initial.bin build/ota/ + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.hw_version }}_${{ matrix.br_config }} + path: | + build/partition_table/partition-table.bin + build/bootloader/bootloader.bin + build/ota/ota_data_initial.bin + build/BlueRetro*.bin + if-no-files-found: error + + - name: Download all artifacts + uses: actions/download-artifact@v3 + + - name: Download all artifacts + run: | + ls -l /workspace/sthope/blueretro/ + mv /workspace/sthope/blueretro/hw1_playstation /workspace/sthope/blueretro/hw1_playstation.zip + mkdir -p merged && mv hw1* merged/ + + - name: Upload Release + uses: akkuman/gitea-release-action@v1 + with: + tag_name: "${{ env.BLUERETRO_VERSION }}" + name: "${{ env.BLUERETRO_VERSION }}" + prerelease: false + files: |- + merged/**