mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-05-13 03:08:03 +08:00
51 lines
1.9 KiB
YAML
51 lines
1.9 KiB
YAML
name: Raspberry Pi compile
|
||
on:
|
||
push:
|
||
# 匹配特定标签 (refs/tags)
|
||
tags:
|
||
- "v*" # 推送事件匹配 v*, 例如 v1.0,v20.15.10 等来触发工作流
|
||
|
||
jobs:
|
||
build:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v3
|
||
- uses: pguyot/arm-runner-action@v2
|
||
with:
|
||
base_image: dietpi:rpi_armv8_bullseye
|
||
cpu: cortex-a53
|
||
bind_mount_repository: true
|
||
image_additional_mb: 10240
|
||
optimize_image: false
|
||
commands: |
|
||
# Rust complains (rightly) that $HOME doesn't match eid home
|
||
export HOME=/root
|
||
# Workaround to CI worker being stuck on Updating crates.io index
|
||
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
||
# Install setup prerequisites
|
||
apt-get update -y --allow-releaseinfo-change
|
||
apt-get upgrade -y
|
||
apt-get autoremove -y
|
||
apt-get install curl
|
||
# Install node
|
||
curl -fsSL https://fnm.vercel.app/install | bash
|
||
source /root/.bashrc
|
||
fnm use --install-if-missing 22
|
||
# Install pnpm
|
||
npm install -g pnpm
|
||
# Install rust
|
||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||
. "$HOME/.cargo/env"
|
||
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash
|
||
# Install build tools and tauri-cli requirements
|
||
apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
|
||
cargo install tauri-cli
|
||
# Install frontend dependencies
|
||
pnpm install
|
||
# Build the application
|
||
cargo tauri build
|
||
- name: Upload deb bundle
|
||
uses: actions/upload-artifact@v4
|
||
with:
|
||
name: Debian Bundle
|
||
path: ${{ github.workspace }}/target/release/bundle/deb/[name]_[version]_arm64.deb |