add: 关闭bind_mount_repository优化 #71
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
# tags: | |
# - '*' | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Release | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- name: x86_64-unknown-linux-gnu | |
file_name : "linux-x86_64" | |
os: ubuntu-22.04 | |
# - name: aarch64-unknown-linux-gnu | |
# file_name : "linux-aarch64" | |
# os: ubuntu-22.04 | |
# - name: i686-pc-windows-msvc | |
# file_name : "windows-x86" | |
# os: windows-latest | |
- name: x86_64-pc-windows-msvc | |
file_name : "windows-x86_64" | |
os: windows-latest | |
- name: aarch64-pc-windows-msvc | |
file_name: "windows-aarch64" | |
os: windows-latest | |
- name: x86_64-apple-darwin | |
file_name : "macos-x86_64" | |
os: macos-latest | |
- name: aarch64-apple-darwin | |
file_name : "macos-aarch64" | |
os: macos-latest | |
runs-on: ${{ matrix.target.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Rust setup | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target.name }} | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: './src-tauri -> target' | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Sync node version and setup cache | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'pnpm' # Set this to npm, yarn or pnpm. | |
- run: pnpm install | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target.name }} | |
- name: Install dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install -y libudev-dev libusb-1.0-0-dev libssl-dev pkg-config | |
sudo apt install libhidapi-dev -y | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev | |
- name: Windows set static crt #静态链接vc库 | |
if: runner.os == 'Windows' | |
run : | | |
New-Item -Path ~/.cargo -ItemType Directory -Force | |
Add-Content ~/.cargo/config '' | |
Add-Content ~/.cargo/config '[target.x86_64-pc-windows-msvc]' | |
Add-Content ~/.cargo/config 'rustflags = ["-C", "target-feature=+crt-static"]' | |
Add-Content ~/.cargo/config '[target.i686-pc-windows-msvc]' | |
Add-Content ~/.cargo/config 'rustflags = ["-C", "target-feature=+crt-static"]' | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: --target ${{ matrix.target.name }} | |
release-linux-aarch64: | |
name: release-linux-aarch64 | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- name: aarch64-unknown-linux-gnu | |
file_name : "linux-aarch64" | |
os: ubuntu-22.04 | |
runs-on: ${{ matrix.target.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pguyot/arm-runner-action@v2 | |
with: | |
base_image: raspios_lite_arm64:latest | |
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 | |
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 framework specific packages | |
apt-get install -y nodejs | |
npm install -g pnpm | |
# 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 | |
export GITHUB_EVENT_PATH="" | |
pnpm install | |
# Build the application | |
pnpm tauri build | |