-
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (110 loc) · 3.87 KB
/
ci.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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
on:
push:
branches:
- master
pull_request:
branches:
- master
name: Continuous Integration
jobs:
test:
name: Test Suite ${{ matrix.job.target }}
runs-on: ${{ matrix.job.os }}
strategy:
matrix:
rust: [stable]
job:
- os: ubuntu-22.04
target: arm-unknown-linux-gnueabi
use-cross: true
- os: ubuntu-22.04
target: armv7-unknown-linux-gnueabihf
use-cross: true
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
target: ${{ matrix.job.target }}
override: true
- name: Install dependencies to avoid vendored libcec build in libcec-sys
if: ${{ matrix.job.use-cross }}
run: sudo apt-get install libudev-dev libcec6 libcec-dev pkg-config libp8-platform-dev
- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
use-cross: ${{ matrix.job.use-cross }}
toolchain: ${{ matrix.rust }}
args: --target ${{ matrix.job.target }} -vv
env:
LIBCEC_VENDORED: "1"
rustfmt:
name: Rustfmt
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: x86_64-unknown-linux-gnu
components: clippy
- name: Clippy Check
uses: actions-rs/cargo@v1
with:
use-cross: true
command: clippy
args: -- --target x86_64-unknown-linux-gnu -D warnings
# broken (and not useful)
# coverage:
# name: Code coverage
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Update apt
# run: sudo apt-get update
# - name: Install dependencies for build and coverage
# run: sudo apt-get install libudev-dev libcec6 libcec-dev pkg-config libp8-platform-dev
# - name: Install stable toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# profile: minimal
# override: true
# - name: Run cargo-tarpaulin
# uses: actions-rs/[email protected]
# with:
# args: "--ignore-tests --out Lcov"
# - name: Upload to Coveralls
# # upload only if push
# if: ${{ github.event_name == 'push' }}
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: "./lcov.info"