forked from aryanshar/libfprint
-
Notifications
You must be signed in to change notification settings - Fork 19
70 lines (69 loc) · 3.39 KB
/
main.yml
File metadata and controls
70 lines (69 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build Linux packages
on:
workflow_dispatch:
push:
branches:
- master
- goodixtls
- sigfm
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: nicksnell/action-reset-repo@master
with:
reset_branch: buildpackage
base_branch: master
github_token: ${{ github.token }}
- name: Merge goodixtls -> buildpackage
uses: devmasx/merge-branch@master
with:
type: now
from_branch: goodixtls
target_branch: buildpackage
github_token: ${{ github.token }}
- name: Merge sigfm -> buildpackage
uses: devmasx/merge-branch@master
with:
type: now
from_branch: sigfm
target_branch: buildpackage
github_token: ${{ github.token }}
- name: Chown user
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
- uses: actions/checkout@v3
with:
ref: buildpackage
- uses: actions/setup-python@v1
- name: Install dependencies
run: sudo apt-get install -y libgusb-dev libgirepository1.0-dev libnss3-dev libgudev-1.0-dev gtk-doc-tools libopencv-dev doctest-dev
- uses: BSFishy/meson-build@v1.0.3
with:
action: build
setup-options: --prefix /usr/ --buildtype=release
options: --verbose
meson-version: 0.63.3
ninja-version: 1.10.2
- name: Install nFPM
run: echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list && sudo apt update && sudo apt install nfpm
- name: Prepare nFPM DEB config
run: cd /home/runner/work/libfprint/libfprint && cp nfpm_deb_sample.yaml nfpm_deb.yaml && sed -i "s/COMMITID/$(git rev-parse --short HEAD)/g" nfpm_deb.yaml && mkdir ./output && cd /home/runner/work/libfprint/libfprint/build && sed -i "s/LIBVERSION/$(meson introspect --projectinfo | jq -r '.version')/g" /home/runner/work/libfprint/libfprint/nfpm_deb.yaml
- name: Prepare nFPM RPM config
run: cd /home/runner/work/libfprint/libfprint && cp nfpm_rpm_sample.yaml nfpm_rpm.yaml && sed -i "s/COMMITID/$(git rev-parse --short HEAD)/g" nfpm_rpm.yaml && cd /home/runner/work/libfprint/libfprint/build && sed -i "s/LIBVERSION/$(meson introspect --projectinfo | jq -r '.version')/g" /home/runner/work/libfprint/libfprint/nfpm_rpm.yaml
- name: Prepare nFPM Arch config
run: cd /home/runner/work/libfprint/libfprint && cp nfpm_arch_sample.yaml nfpm_arch.yaml && sed -i "s/COMMITID/$(git rev-parse --short HEAD)/g" nfpm_arch.yaml && cd /home/runner/work/libfprint/libfprint/build && sed -i "s/LIBVERSION/$(meson introspect --projectinfo | jq -r '.version')/g" /home/runner/work/libfprint/libfprint/nfpm_arch.yaml
- name: Generating DEB package
run: nfpm pkg --packager deb --config ./nfpm_deb.yaml --target ./output/
- name: Generating RPM package
run: nfpm pkg --packager rpm --config ./nfpm_rpm.yaml --target ./output/
- name: Generating ArchLinux package
run: nfpm pkg --packager archlinux --config ./nfpm_arch.yaml --target ./output/
- uses: actions/upload-artifact@v3
with:
name: meson-build-artifacts
path: /home/runner/work/libfprint/libfprint/build
- uses: actions/upload-artifact@v3
with:
name: deb-rpm-arch-packages
path: /home/runner/work/libfprint/libfprint/output