QEMU emulation crashes compiling ring's C code (SIGSEGV in cc). Switch to ubuntu-24.04-arm native runner — faster and no emulation issues. Build time drops from ~40min to ~5min. cc
100 lines
2.8 KiB
YAML
100 lines
2.8 KiB
YAML
name: Build qbzd
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'qbzd-v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-x86_64:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: x86_64-unknown-linux-gnu
|
|
- uses: mlugg/setup-zig@v2
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: crates -> target
|
|
- run: cargo install cargo-zigbuild
|
|
|
|
- name: Install dev headers
|
|
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libdbus-1-dev pkg-config
|
|
|
|
- name: Build qbzd (x86_64, glibc 2.35)
|
|
working-directory: crates
|
|
run: cargo zigbuild --release --target x86_64-unknown-linux-gnu.2.35 -p qbzd
|
|
|
|
- name: Strip binary
|
|
run: strip crates/target/x86_64-unknown-linux-gnu/release/qbzd
|
|
|
|
- name: Upload binary
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: qbzd-x86_64
|
|
path: crates/target/x86_64-unknown-linux-gnu/release/qbzd
|
|
|
|
build-aarch64:
|
|
runs-on: ubuntu-24.04-arm
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: crates -> target
|
|
|
|
- name: Install dev headers
|
|
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libdbus-1-dev pkg-config
|
|
|
|
- name: Build qbzd (aarch64 native)
|
|
working-directory: crates
|
|
run: cargo build --release -p qbzd
|
|
|
|
- name: Strip binary
|
|
run: strip crates/target/release/qbzd
|
|
|
|
- name: Upload binary
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: qbzd-aarch64
|
|
path: crates/target/release/qbzd
|
|
|
|
release:
|
|
needs: [build-x86_64, build-aarch64]
|
|
if: startsWith(github.ref, 'refs/tags/qbzd-v')
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
sparse-checkout: crates/qbzd/service-files
|
|
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: qbzd-x86_64
|
|
path: artifacts/x86_64
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: qbzd-aarch64
|
|
path: artifacts/aarch64
|
|
|
|
- name: Package release
|
|
run: |
|
|
mv artifacts/x86_64/qbzd artifacts/qbzd-linux-x86_64
|
|
mv artifacts/aarch64/qbzd artifacts/qbzd-linux-aarch64
|
|
chmod +x artifacts/qbzd-*
|
|
tar czf artifacts/qbzd-service-files.tar.gz -C crates/qbzd service-files/
|
|
|
|
- name: Create release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
prerelease: true
|
|
generate_release_notes: true
|
|
files: |
|
|
artifacts/qbzd-linux-x86_64
|
|
artifacts/qbzd-linux-aarch64
|
|
artifacts/qbzd-service-files.tar.gz
|