Skip to content

Build qemu-system-aarch64 #143

Build qemu-system-aarch64

Build qemu-system-aarch64 #143

Workflow file for this run

name: Build qemu-system-aarch64
'on':
schedule:
- cron: 0 0 * * *
jobs:
qemu-build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Fetch tags
id: qemu
uses: hakwerk/gha-git-repo-tags@main
with:
repository: qemu/qemu
limit: 1
- name: Parse tags
run: >-
echo "latest-tag=$(echo ${{ steps.qemu.outputs.tags }} | sed -e
's/^.//' -e 's/.$//')" >> $GITHUB_ENV
- name: Check build condition
uses: mukunku/[email protected]
id: check-tag
with:
tag: '${{ env.latest-tag }}'
repo: '${{ env.GITHUB_REPOSITORY }}'
- name: Update build condition
run: >-
echo "skip-build=$(echo ${{steps.check-tag.outputs.exists}})" >>
$GITHUB_ENV
- name: Configure build dep
if: '${{ contains(env.skip-build, ''false'')}}'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >-
git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build
libslirp-dev
version: 1
- name: 'Checkout qemu/qemu @ ${{ env.latest-tag }}'
if: '${{ contains(env.skip-build, ''false'')}}'
uses: actions/checkout@v4
with:
repository: qemu/qemu
submodules: 'true'
ref: '${{ env.latest-tag }}'
- name: Build
if: '${{ contains(env.skip-build, ''false'')}}'
run: |
mkdir $GITHUB_WORKSPACE/output && \
./configure \
--target-list=aarch64-softmmu \
--enable-slirp \
--without-default-features \
--disable-docs \
--disable-qom-cast-debug \
--disable-werror \
--enable-strip \
--prefix=$GITHUB_WORKSPACE/output && \
make -j$(nproc) && \
make install
- name: Prepare release
if: '${{ contains(env.skip-build, ''false'')}}'
run: >-
base_url="https://wiki.qemu.org/ChangeLog" && url=$(echo ${{
env.latest-tag }} | awk -F- '{print $1}' | awk -Fv '{print $2}' | awk
-F. '{print $1"."$2}') && if wget -q --method=HEAD $base_url"/"$url;
then echo "changelog-url="$base_url"/"$url > $GITHUB_ENV; else echo
"changelog-url="$base_url >> $GITHUB_ENV; fi
- name: Make release
if: '${{ contains(env.skip-build, ''false'')}}'
uses: softprops/[email protected]
with:
tag_name: '${{ env.latest-tag }}'
body: 'Full Changelog: ${{ env.changelog-url }}'
fail_on_unmatched_files: 'true'
files: |
output/bin/qemu-system-aarch64