mirror of
https://github.com/armbian/imager.git
synced 2026-01-06 12:31:28 -08:00
Update GitHub Actions workflow for runner compatibility
- Replace deprecated macos-13 with macos-15 for Intel builds - Use macos-latest for ARM64 builds - Split Linux builds into x64 and ARM64 jobs - Add ARM64 Linux cross-compilation using Docker with QEMU - Update ubuntu runner from 22.04 to 24.04
This commit is contained in:
61
.github/workflows/build.yml
vendored
61
.github/workflows/build.yml
vendored
@@ -20,19 +20,8 @@ env:
|
||||
NODE_VERSION: '20'
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
arch: amd64
|
||||
os: ubuntu-22.04
|
||||
- target: aarch64-unknown-linux-gnu
|
||||
arch: arm64
|
||||
os: ubuntu-22.04-arm
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
build-linux-x64:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -74,10 +63,46 @@ jobs:
|
||||
- name: Build Tauri app
|
||||
run: cargo tauri build --bundles deb
|
||||
|
||||
- name: Upload Linux artifacts
|
||||
- name: Upload Linux x64 artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-${{ matrix.arch }}
|
||||
name: linux-amd64
|
||||
path: |
|
||||
src-tauri/target/release/bundle/deb/*.deb
|
||||
if-no-files-found: error
|
||||
|
||||
build-linux-arm64:
|
||||
# Cross-compile ARM64 using Docker with QEMU emulation
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- name: Build in Docker (ARM64)
|
||||
run: |
|
||||
docker run --rm --platform linux/arm64 \
|
||||
-v "${{ github.workspace }}:/app" \
|
||||
-w /app \
|
||||
rust:bookworm \
|
||||
bash -c '
|
||||
apt-get update && apt-get install -y \
|
||||
libwebkit2gtk-4.1-dev libayatana-appindicator3-dev \
|
||||
librsvg2-dev patchelf libssl-dev libgtk-3-dev \
|
||||
squashfs-tools pkg-config nodejs npm && \
|
||||
npm ci && \
|
||||
npm run build && \
|
||||
cargo install tauri-cli --version "^2" --locked && \
|
||||
cargo tauri build --bundles deb
|
||||
'
|
||||
|
||||
- name: Upload Linux ARM64 artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-arm64
|
||||
path: |
|
||||
src-tauri/target/release/bundle/deb/*.deb
|
||||
if-no-files-found: error
|
||||
@@ -89,10 +114,10 @@ jobs:
|
||||
include:
|
||||
- target: x86_64-apple-darwin
|
||||
arch: x64
|
||||
os: macos-13
|
||||
os: macos-15
|
||||
- target: aarch64-apple-darwin
|
||||
arch: arm64
|
||||
os: macos-14
|
||||
os: macos-latest
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
@@ -174,7 +199,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
release:
|
||||
needs: [build-linux, build-macos, build-windows]
|
||||
needs: [build-linux-x64, build-linux-arm64, build-macos, build-windows]
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
permissions:
|
||||
|
||||
Reference in New Issue
Block a user