Utilize cross
to build distribution for Linux ARM64
#107
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
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
include: | |
- platform: macos-latest | |
target: aarch64-apple-darwin | |
runner: cargo | |
bundles: dmg | |
- platform: macos-latest | |
target: x86_64-apple-darwin | |
runner: cargo | |
bundles: dmg | |
- platform: ubuntu-20.04 | |
target: aarch64-unknown-linux-gnu | |
runner: cross | |
bundles: deb | |
- platform: ubuntu-20.04 | |
target: x86_64-unknown-linux-gnu | |
runner: cross | |
bundles: deb | |
- platform: windows-latest | |
target: x86_64-pc-windows-msvc | |
runner: cargo | |
bundles: nsis | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: 'npm' | |
- name: Set up Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- name: Set up cross (Ubuntu only) | |
if: matrix.runner == 'cross' | |
run: cargo install cross | |
- name: Install frontend dependencies | |
run: npm ci | |
- name: Build | |
uses: tauri-apps/tauri-action@v0 | |
id: build | |
with: | |
args: > | |
--target ${{ matrix.target }} | |
--runner ${{ matrix.runner }} | |
--bundles ${{ matrix.bundles }} | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cskburn-desktop-${{ matrix.target }} | |
path: ${{ join(fromJson(steps.build.outputs.artifactPaths), ' ') }} |