-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (39 loc) · 1.25 KB
/
rust.yml
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
name: Health check
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
CROS_LIBVA_H_PATH: ${{ github.workspace }}/work/out/include
CROS_LIBVA_LIB_PATH: ${{ github.workspace }}/work/out/lib
RUSTFLAGS: '-L ${{ github.workspace }}/work/out/lib'
RUSTDOCFLAGS: '-L ${{ github.workspace }}/work/out/lib'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libdrm-dev
version: 1.0
- uses: actions/checkout@v3
- name: "checkout libva"
run: |
curl -O -L https://github.com/intel/libva/archive/refs/tags/2.22.0.tar.gz && \
tar xf 2.22.0.tar.gz --one-top-level=work --strip-components 1
- name: "build libva"
run: |
cd work; \
./autogen.sh --enable-drm --disable-x11 --disable-glx --disable-wayland --prefix=${{ github.workspace }}/work/out && \
make && \
make install
- name: Build
run: cargo build --all-features --verbose --workspace --tests --examples
- name: Clippy
run: cargo clippy --all-features --workspace --tests --examples
- name: Run tests
run: cargo test --verbose
- name: Format
run: cargo fmt --check --all