|
| 1 | +name: Build Linux packages |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - goodixtls |
| 8 | + - sigfm |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - uses: nicksnell/action-reset-repo@master |
| 15 | + with: |
| 16 | + reset_branch: buildpackage |
| 17 | + base_branch: master |
| 18 | + github_token: ${{ github.token }} |
| 19 | + - name: Merge goodixtls -> buildpackage |
| 20 | + uses: devmasx/merge-branch@master |
| 21 | + with: |
| 22 | + type: now |
| 23 | + from_branch: goodixtls |
| 24 | + target_branch: buildpackage |
| 25 | + github_token: ${{ github.token }} |
| 26 | + - name: Merge sigfm -> buildpackage |
| 27 | + uses: devmasx/merge-branch@master |
| 28 | + with: |
| 29 | + type: now |
| 30 | + from_branch: sigfm |
| 31 | + target_branch: buildpackage |
| 32 | + github_token: ${{ github.token }} |
| 33 | + - name: Chown user |
| 34 | + run: | |
| 35 | + sudo chown -R $USER:$USER $GITHUB_WORKSPACE |
| 36 | + - uses: actions/checkout@v3 |
| 37 | + with: |
| 38 | + ref: buildpackage |
| 39 | + - uses: actions/setup-python@v1 |
| 40 | + - name: Install dependencies |
| 41 | + run: sudo apt-get install -y libgusb-dev libgirepository1.0-dev libnss3-dev libgudev-1.0-dev gtk-doc-tools libopencv-dev doctest-dev |
| 42 | + |
| 43 | + with: |
| 44 | + action: build |
| 45 | + setup-options: --prefix /usr/ --buildtype=release |
| 46 | + options: --verbose |
| 47 | + meson-version: 0.63.3 |
| 48 | + ninja-version: 1.10.2 |
| 49 | + - name: Install nFPM |
| 50 | + 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 |
| 51 | + - name: Prepare nFPM config |
| 52 | + run: cd /home/runner/work/libfprint/libfprint && cp nfpm_sample.yaml nfpm.yaml && sed -i "s/COMMITID/$(git rev-parse --short HEAD)/g" nfpm.yaml && mkdir ./output |
| 53 | + - name: Generating DEB package |
| 54 | + run: nfpm pkg --packager deb --target ./output/ |
| 55 | + - name: Generating RPM package |
| 56 | + run: nfpm pkg --packager rpm --target ./output/ |
| 57 | + - name: Generating ArchLinux package |
| 58 | + run: nfpm pkg --packager archlinux --target ./output/ |
| 59 | + - uses: actions/upload-artifact@v3 |
| 60 | + with: |
| 61 | + name: meson-build-artifacts |
| 62 | + path: /home/runner/work/libfprint/libfprint/build |
| 63 | + - uses: actions/upload-artifact@v3 |
| 64 | + with: |
| 65 | + name: deb-rpm-arch-packages |
| 66 | + path: /home/runner/work/libfprint/libfprint/output |
0 commit comments