Linux (x86_64, aarch64) Nightly Build #9
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 (x86_64, aarch64) Nightly Build | |
on: | |
workflow_dispatch: # Allows manual triggering | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build Linux Packages | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] | |
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 | |
- name: Add Target | |
run: rustup target add ${{ matrix.target }} | |
- name: Install Cross-Compilation Tools | |
if: matrix.target == 'aarch64-unknown-linux-gnu' | |
run: | | |
sudo dpkg --add-architecture arm64 | |
# Add ARM64 repositories | |
sudo tee /etc/apt/sources.list.d/arm64.list << EOF | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted | |
EOF | |
sudo apt-get update | |
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
# Install ARM64 versions of GTK and related dependencies | |
sudo apt-get install -y \ | |
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 | |
- name: Configure Cross-Compilation Environment | |
if: matrix.target == 'aarch64-unknown-linux-gnu' | |
run: | | |
echo "PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig" >> $GITHUB_ENV | |
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV | |
echo "PKG_CONFIG_SYSROOT_DIR=/" >> $GITHUB_ENV | |
# Use regular pkg-config instead of the arm64-specific one | |
echo "PKG_CONFIG=pkg-config" >> $GITHUB_ENV | |
- name: Install Linux Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential \ | |
pkg-config \ | |
libgtk-3-dev \ | |
libayatana-appindicator3-dev \ | |
librsvg2-dev \ | |
libglib2.0-dev \ | |
libjavascriptcoregtk-4.0-dev \ | |
libsoup-3.0-dev \ | |
libwebkit2gtk-4.1-dev | |
- name: Install Dependencies | |
run: | | |
npm install | |
- name: Build Frontend | |
run: npm run build | |
- name: Build AppImage (${{ matrix.target }}) | |
run: | | |
echo "Building AppImage for ${{ matrix.target }}..." | |
npm run tauri build -- --target ${{ matrix.target }} --bundles appimage | |
- name: Build Debian Package (${{ matrix.target }}) | |
run: | | |
echo "Building Debian package for ${{ matrix.target }}..." | |
npm run tauri build -- --target ${{ matrix.target }} --bundles deb | |
- name: Upload AppImage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-appimage-${{ matrix.target }} | |
path: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage | |
- name: Upload Debian Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-deb-${{ matrix.target }} | |
path: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb | |
- name: Create Release | |
if: github.event_name == 'schedule' | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Linux Nightly Build ${{ github.sha }} | |
tag_name: linux-nightly-${{ github.sha }} | |
files: | | |
src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage | |
src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |