-
Notifications
You must be signed in to change notification settings - Fork 23
61 lines (51 loc) · 1.29 KB
/
rust.yaml
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
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
SLINT_NO_QT: 1
CARGO_INCREMENTAL: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Linux Dependencies
run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
# - name: Cache Qt
# id: cache-qt
# uses: actions/cache@v3
# with:
# path: ~/work/cargo-ui/Qt
# key: ${{ runner.os }}-${{ github.job }}-Qt
# - name: Install Qt
# uses: jurplel/install-qt-action@v3
# with:
# version: '5.15.2'
# cached: ${{ steps.cache-qt.outputs.cache-hit }}
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
key: rust_cache
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install latest stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
- name: Run rustfmt
run: cargo fmt --all -- --check