mirror of
https://github.com/Team-Resurgent/XboxMemCard.git
synced 2026-08-15 11:18:05 -07:00
94 lines
2.4 KiB
YAML
94 lines
2.4 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- project_name: XboxMemCard-rp2040-xboxog
|
|
pico_board: pico
|
|
config_type: 1
|
|
- project_name: XboxMemCard-rp2350-xboxog
|
|
pico_board: pico2
|
|
config_type: 1
|
|
- project_name: XboxMemCard-rp2040-unformatted
|
|
pico_board: pico
|
|
config_type: 2
|
|
- project_name: XboxMemCard-rp2350-unformatted
|
|
pico_board: pico2
|
|
config_type: 2
|
|
- project_name: XboxMemCard-rp2040-sdcard
|
|
pico_board: pico
|
|
config_type: 3
|
|
- project_name: XboxMemCard-rp2350-sdcard
|
|
pico_board: pico2
|
|
config_type: 3
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Dependencies
|
|
run: sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
|
|
|
- name: Get Pico SDK
|
|
run: git clone --branch 2.1.0 --recurse-submodules https://github.com/raspberrypi/pico-sdk.git
|
|
|
|
- name: Create Build
|
|
run: |
|
|
rm -rf build
|
|
mkdir -p build
|
|
|
|
- name: Build XboxMemCard
|
|
uses: threeal/cmake-action@v2
|
|
id: cmake
|
|
with:
|
|
source-dir: .
|
|
options: |
|
|
PICO_SDK_PATH=${{ github.workspace }}/pico-sdk
|
|
PROJECT_NAME=${{ matrix.project_name }}
|
|
PICO_BOARD=${{ matrix.pico_board }}
|
|
CONFIG_TYPE=${{ matrix.config_type }}
|
|
|
|
- name: List Files
|
|
run: ls -lh build/**
|
|
|
|
- name: Upload UF2 Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: uf2-${{ matrix.project_name }}
|
|
path: build/*.uf2
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Download All Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: output
|
|
|
|
- name: Create Draft Release
|
|
uses: softprops/action-gh-release@v2.2.2
|
|
#if: github.ref == 'refs/heads/main'
|
|
with:
|
|
tag_name: latest
|
|
draft: true
|
|
files: output/**/*.uf2
|
|
|
|
- name: Create Tagged Release
|
|
uses: softprops/action-gh-release@v2.2.2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: output/**/*.uf2
|