Linux (aarch64) Nightly Build #6
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: Linux (aarch64) Nightly Build | |
on: | |
workflow_dispatch: # Allows manual triggering | |
schedule: | |
- cron: '0 0 * * *' # Run daily at midnight UTC | |
env: | |
CARGO_TERM_COLOR: always | |
PKG_CONFIG_ALLOW_CROSS: 1 | |
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig | |
PKG_CONFIG: /usr/bin/aarch64-linux-gnu-pkg-config | |
jobs: | |
build: | |
name: Build Linux aarch64 Packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'npm' | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: aarch64-unknown-linux-gnu | |
- name: Configure ARM64 repositories | |
run: | | |
sudo dpkg --add-architecture arm64 | |
sudo tee /etc/apt/sources.list.d/arm64.list << EOF | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse | |
EOF | |
sudo rm -f /etc/apt/sources.list.d/security.list | |
sudo apt-get update | |
# Install required packages including cross-compilation tools | |
sudo apt-get install -y \ | |
build-essential \ | |
pkg-config \ | |
pkg-config-aarch64-linux-gnu \ | |
gcc-aarch64-linux-gnu \ | |
g++-aarch64-linux-gnu \ | |
libgtk-3-dev:arm64 \ | |
libayatana-appindicator3-dev:arm64 \ | |
librsvg2-dev:arm64 \ | |
libglib2.0-dev:arm64 \ | |
libjavascriptcoregtk-4.0-dev:arm64 \ | |
libsoup-3.0-dev:arm64 \ | |
libwebkit2gtk-4.1-dev:arm64 | |
# Configure pkg-config for cross-compilation | |
echo "PKG_CONFIG=/usr/bin/aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV | |
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV | |
- name: Install Dependencies | |
run: npm install | |
- name: Configure pkg-config for Cross-Compilation | |
run: | | |
sudo apt-get install -y pkg-config-aarch64-linux-gnu | |
echo "PKG_CONFIG=/usr/bin/aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV | |
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV | |
- name: Build Frontend | |
run: npm run build | |
- name: Build AppImage | |
run: | | |
echo "Building AppImage for aarch64..." | |
npm run tauri build -- --target aarch64-unknown-linux-gnu --bundles appimage | |
- name: Build Debian Package | |
run: | | |
echo "Building Debian package for aarch64..." | |
npm run tauri build -- --target aarch64-unknown-linux-gnu --bundles deb | |
- name: Upload AppImage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-appimage-aarch64 | |
path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/*.AppImage | |
- name: Upload Debian Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-deb-aarch64 | |
path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/*.deb | |
- name: Create Release | |
if: github.event_name == 'schedule' # Only create release for scheduled builds | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Linux ARM64 Nightly Build ${{ github.sha }} | |
tag_name: linux-arm64-nightly-${{ github.sha }} | |
files: | | |
src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/*.AppImage | |
src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/*.deb | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |