CI #86
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
# Build at 00:00 on every 12th day-of-month. | |
schedule: | |
- cron: "0 0 */12 * *" | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ main ] | |
paths-ignore: [ '**/README.md' ] | |
pull_request: | |
branches: [ main ] | |
paths-ignore: [ '**/README.md' ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build-stable" | |
build-stable: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-20.04 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Prerequisites | |
run: | | |
sudo apt-get update && sudo apt-get upgrade -y | |
sudo apt-get install ninja-build libxml2-utils xsltproc libglib2.0-dev gnutls-bin libgnutls28-dev libxml2-dev pip docutils-common gettext libpciaccess0 libpciaccess-dev libyajl2 libyajl-dev | |
sudo apt-get install python3-venv git pkg-config libglib2.0-dev flex bison git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev libspice-protocol-dev | |
sudo apt-get install libaio-dev libbluetooth-dev libcapstone-dev libbrlapi-dev libbz2-dev libusb* libspice-server1 libspice-server-dev | |
sudo apt-get install libcap-ng-dev libcurl4-gnutls-dev libgtk-3-dev libnfs* slirp* libslirp0 libslirp-dev | |
sudo apt-get install libibverbs-dev libjpeg8-dev libncurses5-dev libnuma-dev libvirglrenderer-dev libvirglrenderer1 virgl-server libiscsi7 libiscsi-dev libzstd1 libzstd-dev | |
sudo apt-get install librbd-dev librdmacm-dev | |
sudo apt-get install libsasl2-dev libsdl2-dev libseccomp-dev libsnappy-dev libssh-dev | |
sudo apt-get install libvde-dev libvdeplug-dev libvte-2.91-dev libxen-dev liblzo2-dev | |
sudo apt-get install valgrind xfslibs-dev libpixman-1-0 libpixman-1-dev | |
wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" -O linuxdeploy ; chmod a+x linuxdeploy | |
wget -q "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" -O appimagetool ; chmod a+x appimagetool | |
mkdir -p lucas/usr/lib/ | |
mkdir -p lucas/usr/share/ | |
cp -r /usr/share/mime/ lucas/usr/share/ | |
git clone https://gitlab.com/qemu-project/qemu.git | |
cd qemu | |
git submodule init | |
git submodule update --recursive | |
./configure --disable-docs --enable-modules --enable-system --enable-virglrenderer --enable-guest-agent --enable-gio --enable-sdl --enable-gtk --enable-gtk-clipboard --enable-spice --enable-spice-protocol --enable-pixman --enable-user --enable-opengl --enable-kvm --enable-gnutls --enable-libssh --enable-libusb --enable-libudev --enable-nettle --enable-alsa --enable-pa --enable-slirp --enable-slirp-smbd --prefix=${GITHUB_WORKSPACE}/lucas/usr/ | |
make | |
make install | |
cd ${GITHUB_WORKSPACE} | |
find -iname 'AppRun' | xargs -i -t -exec cp {} /home/runner/work/Qemu_Appimage/Qemu_Appimage/lucas/ | |
find -iname 'qemu.desktop' | xargs -i -t -exec cp {} /home/runner/work/Qemu_Appimage/Qemu_Appimage/lucas/ | |
find -iname 'qemu_logo_no_text.svg' | xargs -i -t -exec cp {} /home/runner/work/Qemu_Appimage/Qemu_Appimage/lucas/ | |
find -iname 'libunionpreload.so' | xargs -i -t -exec cp {} /home/runner/work/Qemu_Appimage/Qemu_Appimage/lucas/ | |
# Runs a set of commands using the runners shell | |
- name: Build appimage | |
run: | | |
find -name 'linuxdeploy**' -type f -exec {} --appdir ${GITHUB_WORKSPACE}/lucas/ \; | |
cd ${GITHUB_WORKSPACE} && cp qemu.desktop lucas/ | |
ARCH=x86_64 find -name 'appimagetool**' -type f -exec {} ${GITHUB_WORKSPACE}/lucas/ \; | |
- name: release | |
uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303" | |
with: | |
title: Continuous build | |
automatic_release_tag: continuous-stable | |
prerelease: false | |
draft: false | |
files: /home/runner/work/Qemu_Appimage/Qemu_Appimage/*.AppImage* | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" |