mirror of
https://github.com/bleackstorm/SteamFrame-FPV-Control-Center.git
synced 2026-12-03 07:31:57 +01:00
116 lines
4.5 KiB
YAML
116 lines
4.5 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build-linux-x86_64:
|
|
name: Build Linux x86_64
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install native Linux dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
build-essential pkg-config \
|
|
libglib2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
|
|
libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev \
|
|
libvulkan-dev libopenxr-dev libgl1-mesa-dev libfontconfig1-dev
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build release binary (x86_64)
|
|
run: cargo build --release --locked
|
|
- name: Package tarball
|
|
run: |
|
|
mkdir -p dist/steamframe-fpv-linux-x86_64
|
|
cp target/release/steamframe-fpv launch.sh launch_vr.sh steamframe-fpv.desktop steamframe-fpv-vr.desktop dist/steamframe-fpv-linux-x86_64/
|
|
cp -r scripts dist/steamframe-fpv-linux-x86_64/
|
|
tar -C dist -czf "dist/steamframe-fpv-${GITHUB_REF_NAME}-linux-x86_64.tar.gz" steamframe-fpv-linux-x86_64
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: steamframe-fpv-linux-x86_64
|
|
path: dist/steamframe-fpv-*-linux-x86_64.tar.gz
|
|
|
|
build-linux-arm64:
|
|
name: Build Steam Frame ARM64 (aarch64)
|
|
runs-on: ubuntu-24.04-arm
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install native ARM64 dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
build-essential pkg-config \
|
|
libglib2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
|
|
libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev \
|
|
libvulkan-dev libopenxr-dev libgl1-mesa-dev libfontconfig1-dev
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build release binary (aarch64)
|
|
run: cargo build --release --locked
|
|
- name: Package tarball
|
|
run: |
|
|
mkdir -p dist/steamframe-fpv-linux-aarch64
|
|
cp target/release/steamframe-fpv launch.sh launch_vr.sh steamframe-fpv.desktop steamframe-fpv-vr.desktop dist/steamframe-fpv-linux-aarch64/
|
|
cp -r scripts dist/steamframe-fpv-linux-aarch64/
|
|
tar -C dist -czf "dist/steamframe-fpv-${GITHUB_REF_NAME}-linux-aarch64.tar.gz" steamframe-fpv-linux-aarch64
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: steamframe-fpv-linux-aarch64
|
|
path: dist/steamframe-fpv-*-linux-aarch64.tar.gz
|
|
|
|
build-firmware-rp2350:
|
|
name: Build Firmware RP2350 (.uf2)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install arduino-cli, rp2040 core and firmware libraries
|
|
run: |
|
|
mkdir -p "$HOME/.local/bin"
|
|
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$HOME/.local/bin" sh
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
"$HOME/.local/bin/arduino-cli" config init
|
|
"$HOME/.local/bin/arduino-cli" config set board_manager.additional_urls \
|
|
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
|
|
"$HOME/.local/bin/arduino-cli" core update-index
|
|
"$HOME/.local/bin/arduino-cli" core install rp2040:rp2040
|
|
"$HOME/.local/bin/arduino-cli" lib install "Pico PIO USB" "Adafruit NeoPixel"
|
|
- name: Compile g29_crsf firmware (.uf2)
|
|
run: |
|
|
mkdir -p dist/firmware
|
|
arduino-cli compile \
|
|
--fqbn rp2040:rp2040:waveshare_rp2350_plus:usbstack=tinyusb \
|
|
--output-dir dist/firmware \
|
|
firmware/g29_crsf
|
|
mv dist/firmware/g29_crsf.ino.uf2 "dist/firmware/g29_crsf-${GITHUB_REF_NAME}-waveshare_rp2350_plus.uf2"
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: firmware-rp2350
|
|
path: dist/firmware/*.uf2
|
|
|
|
publish-release:
|
|
name: Publish GitHub Release
|
|
needs: [build-linux-x86_64, build-linux-arm64, build-firmware-rp2350]
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
path: release-assets
|
|
merge-multiple: true
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
generate_release_notes: true
|
|
files: release-assets/*
|