mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-01-21 19:35:43 +01:00
Initial support for building binaires on push to github
This commit is contained in:
parent
7cb15b645c
commit
0e95508498
26
.github/workflows/package.yml
vendored
Normal file
26
.github/workflows/package.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: Package bygfoot
|
||||
|
||||
on: push
|
||||
|
||||
env:
|
||||
BYGFOOT_VERSION: "2.3.3-unofficial-git-${{ github.sha }}"
|
||||
|
||||
jobs:
|
||||
package-linux:
|
||||
runs-on:
|
||||
- ubuntu-16.04
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install libglib2.0-dev libgtk2.0-dev libpango1.0-dev libatk1.0-dev libfreetype6-dev ninja-build
|
||||
|
||||
- name: Package Bygfoot
|
||||
run: ./scripts/package-linux.sh .
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: "bygfoot-${{ env.BYGFOOT_VERSION }}"
|
||||
path: "*.bz2"
|
38
scripts/package-linux.sh
Executable file
38
scripts/package-linux.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
srcdir=$1
|
||||
|
||||
version="2.3.3"
|
||||
|
||||
if [ -n "$BYGFOOT_VERSION" ]; then
|
||||
version=$BYGFOOT_VERSION
|
||||
fi
|
||||
|
||||
builddir=./build-$version
|
||||
installdir=./bygfoot-$version
|
||||
|
||||
mkdir -p $builddir
|
||||
mkdir -p $installdir
|
||||
|
||||
cmake -G Ninja -B $builddir -S $srcdir -DCMAKE_INSTALL_PREFIX=$installdir -DCMAKE_C_FLAGS=-DVERS=\"\\\"$version\\\"\"
|
||||
ninja -v -C $builddir install
|
||||
|
||||
# FIXME: This is a work-around for bygfoot not being able to find the
|
||||
# bygfoot_constants file when its packaged this way.
|
||||
|
||||
mv $installdir/bin/bygfoot $installdir/bin/.bygfoot-bin
|
||||
|
||||
|
||||
cat <<EOF > $installdir/bin/bygfoot
|
||||
#!/bin/bash
|
||||
cd \`dirname "\$0"\`
|
||||
cd ../share/bygfoot
|
||||
../../bin/.bygfoot-bin
|
||||
EOF
|
||||
|
||||
chmod a+x $installdir/bin/bygfoot
|
||||
|
||||
tar -cjf bygfoot-$version.tar.bz2 $installdir
|
||||
|
Loading…
Reference in New Issue
Block a user