-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.43 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Rust
on:
pull_request:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
DISPLAY: :99
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
rustup component add rustfmt
rustup component add clippy
sudo apt-get install \
clang \
cmake \
libx11-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev \
mesa-common-dev \
pkg-config \
libssl-dev \
libgl1-mesa-dev \
xvfb
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build --all
- name: Test
run: xvfb-run cargo test --all
- name: Upload test logs on fail
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: Test logs
path: /tmp/wowser-test
- name: Check format
run: cargo fmt --all -- --check
- name: Generate Docs
run: RUSTDOCFLAGS="-Dwarnings" cargo doc --all
automerge:
needs: build
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: fastify/[email protected]
with:
github-token: ${{secrets.DEPENDABOT_PAT}}