Debian Codegraph @

.github/workflows/ci.yaml

raw symbols SCIP
1 name: CI
2
3 on:
4 pull_request:
5 push:
6
7 jobs:
8 check-and-build:
9 strategy:
10 matrix:
11 rust_version: ['1.71.1', stable]
12 runs-on: ubuntu-latest
13 outputs:
14 libei_version: ${{ steps.libei_version.outputs.libei_version }}
15 steps:
16 - uses: actions/checkout@v4
17 - uses: dtolnay/rust-toolchain@master
18 with:
19 toolchain: ${{ matrix.rust_version }}
20 components: clippy, rustfmt
21 - run: sudo apt-get -qq update
22 - run: sudo apt-get install -y libxkbcommon-dev
23
24 - run: cargo fmt --all -- --check
25
26 # Make sure there are no broken intra-doc links with and without features
27 - run: RUSTDOCFLAGS="--deny warnings" cargo doc --no-deps --all-features
28 - run: RUSTDOCFLAGS="--deny warnings" cargo doc --no-deps
29
30 - run: cargo clippy --all-features -- -Dwarnings
31 if: matrix.rust_version != 'stable'
32 - run: cargo clippy --all-features --all-targets -- -Dwarnings
33 if: matrix.rust_version == 'stable'
34
35 # Sanity check: generic code doesn't depend on features
36 - run: cargo check
37
38 - run: cargo build --all-features
39 if: matrix.rust_version != 'stable'
40 - run: cargo build --all-features --examples
41 if: matrix.rust_version == 'stable'
42
43 - run: echo libei_version="$(cat LIBEI_VERSION)" >> "$GITHUB_OUTPUT"
44 id: libei_version
45
46 - uses: actions/upload-artifact@v4
47 with:
48 name: reis-demo-server
49 path: target/debug/examples/reis-demo-server
50 libei-test:
51 runs-on: ubuntu-latest
52 needs: check-and-build
53 steps:
54 - run: git clone -b "$libei_version" https://gitlab.freedesktop.org/libinput/libei .
55 env:
56 libei_version: ${{needs.check-and-build.outputs.libei_version}}
57 - uses: actions/download-artifact@v4
58 with:
59 name: reis-demo-server
60 - run: chmod +x reis-demo-server
61 - run: sudo apt-get -qq update
62 - run: sudo apt-get install -y meson libsystemd-dev python3-pytest python3-structlog python3-attr python3-dbusmock python3-pip
63 - run: pip3 install strenum
64 - run: meson setup build
65 - run: meson compile -C build
66 - run: |
67 mkdir xdg
68 export XDG_RUNTIME_DIR=$PWD/xdg
69 export LIBEI_TEST_SERVER=$PWD/reis-demo-server
70 export LIBEI_TEST_SOCKET=$PWD/xdg/eis-0
71 cd build && pytest-3