GHA package build script
This commit is contained in:
parent
d4aa32a34c
commit
2b7601d9b9
4 changed files with 148 additions and 5 deletions
126
.github/workflows/ppa-release.yml
vendored
Normal file
126
.github/workflows/ppa-release.yml
vendored
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: The git tag/ref to checkout
|
||||||
|
required: true
|
||||||
|
default: 'vFIXME'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
outputs:
|
||||||
|
filename: ${{ steps.get_filename.outputs.filename }}
|
||||||
|
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os_name: debian
|
||||||
|
os_codename: bullseye
|
||||||
|
build_type: 'QT'
|
||||||
|
has_backports: backports
|
||||||
|
|
||||||
|
- os_name: debian
|
||||||
|
os_codename: bookworm
|
||||||
|
build_type: 'QT'
|
||||||
|
|
||||||
|
|
||||||
|
- os_name: ubuntu
|
||||||
|
os_codename: bionic
|
||||||
|
is_lts: lts
|
||||||
|
build_type: 'WITHOUT_QT'
|
||||||
|
|
||||||
|
- os_name: ubuntu
|
||||||
|
os_codename: focal
|
||||||
|
is_lts: lts
|
||||||
|
build_type: 'QT'
|
||||||
|
|
||||||
|
- os_name: ubuntu
|
||||||
|
os_codename: hirsute
|
||||||
|
build_type: 'QT'
|
||||||
|
|
||||||
|
- os_name: ubuntu
|
||||||
|
os_codename: impish
|
||||||
|
build_type: 'QT'
|
||||||
|
|
||||||
|
container: ${{ matrix.os_name }}:${{ matrix.os_codename }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- run: apt-get update && apt-get install -y --no-install-recommends git ca-certificates apt-transport-https curl gpg gpg-agent lsb-release dpkg-dev apt-utils rsync file
|
||||||
|
|
||||||
|
- name: Import GPG key
|
||||||
|
id: import_gpg
|
||||||
|
uses: crazy-max/ghaction-import-gpg@v4
|
||||||
|
with:
|
||||||
|
gpg_private_key: ${{ secrets.PACKAGE_SIGNING_KEY }}
|
||||||
|
passphrase: ''
|
||||||
|
|
||||||
|
- run: curl -L https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
||||||
|
- if: matrix.has_backports == 'backports'
|
||||||
|
run: echo 'deb http://deb.debian.org/debian ${{ matrix.os_codename }}-backports main' >> /etc/apt/sources.list
|
||||||
|
|
||||||
|
- if: matrix.is_lts == 'lts'
|
||||||
|
run: echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/${{ matrix.os_name }}/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null
|
||||||
|
|
||||||
|
- run: git clone --depth 1 --branch ${{ github.event.inputs.tag || github.event.release.tag_name }} "${{ github.server_url }}/${{ github.repository }}" . && git submodule init && git submodule update
|
||||||
|
|
||||||
|
- run: INSTALL_DEPS=${{ matrix.build_type }} bash ./source/linux/build.sh
|
||||||
|
|
||||||
|
- run: cd build/packages && rm -rf ./_CPack_Packages
|
||||||
|
- run: cd build/packages && dpkg-scanpackages --multiversion . > Packages
|
||||||
|
- run: cd build/packages && gzip -k -f Packages
|
||||||
|
|
||||||
|
- run: cd build/packages && apt-ftparchive release . > Release
|
||||||
|
- run: cd build/packages && gpg --default-key "${{ secrets.PACKAGE_SIGNING_EMAIL }}" -abs -o - Release > Release.gpg
|
||||||
|
- run: cd build/packages && gpg --default-key "${{ secrets.PACKAGE_SIGNING_EMAIL }}" --clearsign -o - Release > InRelease
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os_name }}-${{ matrix.os_codename }}
|
||||||
|
path: ./build/packages/**/*
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os_name: debian
|
||||||
|
os_codename: bullseye
|
||||||
|
- os_name: debian
|
||||||
|
os_codename: bookworm
|
||||||
|
|
||||||
|
- os_name: ubuntu
|
||||||
|
os_codename: bionic
|
||||||
|
- os_name: ubuntu
|
||||||
|
os_codename: focal
|
||||||
|
- os_name: ubuntu
|
||||||
|
os_codename: hirsute
|
||||||
|
- os_name: ubuntu
|
||||||
|
os_codename: impish
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
ref: ${{ github.event.inputs.tag || github.event.release.tag_name }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os_name }}-${{ matrix.os_codename }}
|
||||||
|
path: packages
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: JamesIves/github-pages-deploy-action@v4.3.0
|
||||||
|
with:
|
||||||
|
branch: gh-pages
|
||||||
|
folder: packages
|
||||||
|
target-folder: packages/${{ matrix.os_name }}/dists/${{ matrix.os_codename }}
|
|
@ -84,7 +84,8 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apple ][ emulator for Linux")
|
||||||
set(CPACK_PACKAGE_CONTACT "audetto <mariofutire@gmail.com>")
|
set(CPACK_PACKAGE_CONTACT "audetto <mariofutire@gmail.com>")
|
||||||
|
|
||||||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libyaml-0-2,libminizip1,libqt5gui5,libqt5widgets5,libqt5multimedia5,libqt5gamepad5,libncursesw6,libevdev2,libsdl2-image-2.0-0,libsdl2-2.0-0,libgles2,libpcap0.8,libslirp0,libboost-program-options1.74.0")
|
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS "ON")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS "ON")
|
||||||
|
|
||||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||||
set(CPACK_RPM_PACKAGE_GROUP "Applications/Emulators")
|
set(CPACK_RPM_PACKAGE_GROUP "Applications/Emulators")
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3587ee492bbee8144dbfbf5f660d4a7fd6316638
|
Subproject commit 088487a3d44dc75db73ed4aff9bbd224604102ac
|
|
@ -1,9 +1,25 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
BASEDIR="$(dirname "$(readlink -e "${BASH_SOURCE}")")/../.."
|
||||||
|
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
mkdir -p build
|
BUILD_QAPPLE=""
|
||||||
|
if [ "${INSTALL_DEPS:-}" = "QT" ] ; then
|
||||||
|
BUILD_QAPPLE="-DBUILD_QAPPLE=1"
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y --no-install-recommends qtbase5-dev qtmultimedia5-dev libqt5gamepad5-dev
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "${INSTALL_DEPS:-}" ] ; then
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y --no-install-recommends cmake make gcc g++ libyaml-dev libminizip-dev libboost-program-options-dev libncurses-dev libevdev-dev libsdl2-dev libsdl2-image-dev libgl-dev libpcap-dev
|
||||||
|
apt-get install -y --no-install-recommends libslirp-dev || echo "Skipping libslirp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$BASEDIR"
|
||||||
|
mkdir -p build/packages
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
|
cmake "$@" -DBUILD_APPLEN=1 $BUILD_QAPPLE -DBUILD_SA2=1 -DCMAKE_BUILD_TYPE=RELEASE "$BASEDIR"
|
||||||
make -j 2
|
make -j $(nproc)
|
||||||
|
cpack -G DEB -B "$BASEDIR/build/packages"
|
||||||
|
|
Loading…
Add table
Reference in a new issue