File: main.yml

package info (click to toggle)
piper 0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,460 kB
  • sloc: python: 2,734; sh: 85; makefile: 5
file content (48 lines) | stat: -rw-r--r-- 1,705 bytes parent folder | download
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
name: linux

on: [ push, pull_request ]

env:
  UBUNTU_DEPS: |
      pkg-config gettext appstream
      python3 python-gi-dev python3-lxml python3-evdev
      gir1.2-rsvg-2.0 python3-gi-cairo flake8 gtk-update-icon-cache desktop-file-utils
  PIP_PACKAGES: meson ninja black ruff

jobs:
  build-and-dist:
    runs-on: ubuntu-22.04
    strategy:
      matrix:
        meson_args:
          - '-Druntime-dependency-checks=false'
          - '-Druntime-dependency-checks=false -Dbuildtype=plain'
          - '-Druntime-dependency-checks=false -Dbuildtype=release'
    steps:
      - uses: actions/checkout@v3
      - uses: libratbag/libratbag/.github/actions/pkginstall@master
        with:
          apt: $UBUNTU_DEPS
          pip: $PIP_PACKAGES
      - name: meson install ${{matrix.meson_args}}
        uses: libratbag/libratbag/.github/actions/meson@master
        with:
          meson_args: --prefix=$PWD/_instdir ${{matrix.meson_args}}
          ninja_args: install
      - name: check installation of data files
        run:  diff -u <(cd data/devices; ls *.device) <(cd _instdir/share/libratbag; ls *.device)
      - name: ninja uninstall
        uses: libratbag/libratbag/.github/actions/meson@master
        with:
          meson_args: --prefix=$PWD/_instdir
          ninja_args: uninstall
      - name: list any files left after uninstall
        run: (test -d _instdir && tree _instdir) || exit 0
      # Capture all the meson logs, even if we failed
      - uses: actions/upload-artifact@v3
        if: ${{ always() }}  # even if we fail
        with:
          name: meson test logs
          path: |
            builddir/meson-logs/testlog*.txt
            builddir/meson-logs/meson-log.txt