Browse Source

Merge pull request #32 from MateuszStudiosCompany/feature/debian-builds

Github actions - debian builds
sisyphus
Jezer Mejía 3 years ago committed by GitHub
parent
commit
3ed3a9af65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 58
      .github/actions/build/action.yml
  2. 33
      .github/workflows/build.yml
  3. 44
      .github/workflows/publish.yml
  4. 3
      .gitignore
  5. 24
      README.md

58
.github/actions/build/action.yml

@ -0,0 +1,58 @@
name: "Build web-greeter"
description: "Builds web-greeter"
inputs:
target-distro:
required: true
description: "Target distro"
runs:
using: "composite"
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Install dependencies
shell: bash
run: |
sudo apt update
sudo apt install \
liblightdm-gobject-1-dev \
libgirepository1.0-dev \
libqt5webengine5 \
pyqt5-dev-tools \
python3-gi \
python3-pyqt5 \
python3-ruamel.yaml \
python3-pyinotify \
python3-xlib \
python3-pip \
dpkg
-
name: Build web-greeter
shell: bash
run: make build
-
name: Prepare deb build (common)
shell: bash
run: |
cp -r build/DEBIAN/ build/install_root/
-
name: Prepare deb build (for Debian)
shell: bash
if: ${{ inputs.target-distro == 'debian' }}
run: |
sed -i "s/liblightdm-gobject-1-dev/liblightdm-gobject-dev/g" build/install_root/DEBIAN/control
-
name: Build deb
shell: bash
run: |
cd build/
dpkg-deb --root-owner-group --build install_root "web-greeter.deb"
dpkg --info "./web-greeter.deb"
-
name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: build-${{ inputs.target-distro }}
path: ./build/web-greeter.deb
retention-days: 7

33
.github/workflows/build.yml

@ -1,26 +1,27 @@
name: Build Test name: Build Test
on: on: [push, pull_request]
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs: jobs:
build-ubuntu:
build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- -
name: Checkout name: Checkout local actions
uses: actions/checkout@v2 uses: actions/checkout@v2
-
name: Install dependencies
run: |
sudo apt update
sudo apt install liblightdm-gobject-1-dev libqt5webengine5 pyqt5-dev-tools python3-gi python3-pyqt5 python3-ruamel.yaml python3-pyinotify python3-xlib python3-pip libgirepository1.0-dev build-essential gobject-introspection
- -
name: Build and install web-greeter name: Build and install web-greeter
run: sudo make install uses: "./.github/actions/build"
with:
target-distro: ubuntu
build-debian:
runs-on: ubuntu-latest
steps:
-
name: Checkout local actions
uses: actions/checkout@v2
-
name: Build web-greeter
uses: "./.github/actions/build"
with:
target-distro: debian

44
.github/workflows/publish.yml

@ -7,35 +7,43 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build: publish-ubuntu:
name: Publish binaries name: Publish ubuntu binaries
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- -
name: Checkout name: Checkout local actions
uses: actions/checkout@v2 uses: actions/checkout@v2
-
name: Install dependencies
run: |
sudo apt update
sudo apt install liblightdm-gobject-1-dev libqt5webengine5 pyqt5-dev-tools python3-gi python3-pyqt5 python3-ruamel.yaml python3-pyinotify python3-xlib python3-pip
sudo apt install dpkg
- -
name: Build and install web-greeter name: Build and install web-greeter
run: make install uses: "./.github/actions/build"
with:
target-distro: ubuntu
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/web-greeter.deb
asset_name: web-greeter-$tag-ubuntu.deb
tag: ${{ github.ref }}
overwrite: true
publish-debian:
name: Publish debian binaries
runs-on: ubuntu-latest
steps:
- -
name: Build deb name: Checkout local actions
run: | uses: actions/checkout@v2
cd build/ -
cp -r DEBIAN/ install_root/ name: Build web-greeter
dpkg-deb --root-owner-group --build install_root "web-greeter.deb" uses: "./.github/actions/build"
dpkg --info "./web-greeter.deb" with:
target-distro: debian
- name: Upload binaries to release - name: Upload binaries to release
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/web-greeter.deb file: build/web-greeter.deb
asset_name: web-greeter-$tag.deb asset_name: web-greeter-$tag-debian.deb
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true

3
.gitignore vendored

@ -58,3 +58,6 @@ Makefile.in
_book/ _book/
node_modules/ node_modules/
package-lock.json package-lock.json
# vscode
.vscode/

24
README.md

@ -41,18 +41,18 @@ apt install ./web-greeter-VER.deb
``` ```
## Dependencies ## Dependencies
| | arch | ubuntu | fedora | openSUSE | | | arch | ubuntu | fedora | openSUSE | debian |
|--------------------------|----------------------|-------------------------|---------------------|----------------------| |--------------------------|----------------------|-------------------------|---------------------|----------------------|-------------------------|
|**liblightdm-gobject** |lightdm |liblightdm-gobject-1-dev |lightdm-gobject-devel|liblightdm-gobject-1-0| |**liblightdm-gobject** |lightdm |liblightdm-gobject-1-dev |lightdm-gobject-devel|liblightdm-gobject-1-0|liblightdm-gobject-dev |
|**pygobject** |python-gobject |python3-gi |pygobject3 |python3-gobject | |**pygobject** |python-gobject |python3-gi |pygobject3 |python3-gobject |python3-gi |
|**pyqt5** |python-pyqt5 |python3-pyqt5 |python3-qt5 |python3-qt5 | |**pyqt5** |python-pyqt5 |python3-pyqt5 |python3-qt5 |python3-qt5 |python3-pyqt5 |
|**pyqt5-webengine** |python-pyqt5-webengine|python3-pyqt5.qtwebengine|python3-qt5-webengine|python3-qtwebengine | |**pyqt5-webengine** |python-pyqt5-webengine|python3-pyqt5.qtwebengine|python3-qt5-webengine|python3-qtwebengine |python3-pyqt5.qtwebengine|
|**python-yaml** |python-ruamel-yaml |python3-ruamel.yaml |python3-ruamel-yaml |python3-ruamel-yaml | |**python-yaml** |python-ruamel-yaml |python3-ruamel.yaml |python3-ruamel-yaml |python3-ruamel-yaml |python3-ruamel.yaml |
|**python-inotify** |python-pyinotify |python3-pyinotify |python3-inotify |python3-inotify | |**python-inotify** |python-pyinotify |python3-pyinotify |python3-inotify |python3-inotify |python3-pyinotify |
|**qt5-webengine** |qt5-webengine |libqt5webengine5 |qt5-qtwebengine |libqt5-qtwebengine | |**qt5-webengine** |qt5-webengine |libqt5webengine5 |qt5-qtwebengine |libqt5-qtwebengine |libqt5webengine5 |
|**gobject-introspection** |gobject-introspection |gobject-introspection |gobject-introspection|gobject-introspection | |**gobject-introspection** |gobject-introspection |gobject-introspection |gobject-introspection|gobject-introspection |gobject-introspection |
|**libxcb** |libxcb |libxcb1-dev |libxcb-devel |libxcb | |**libxcb** |libxcb |libxcb1-dev |libxcb-devel |libxcb |libxcb1-dev |
|**libx11** |libx11 |libx11-dev |libX11-devel |libx11 | |**libx11** |libx11 |libx11-dev |libX11-devel |libx11 |libx11-dev |
### Build dependencies ### Build dependencies

Loading…
Cancel
Save