-
Notifications
You must be signed in to change notification settings - Fork 4
73 lines (63 loc) · 2.15 KB
/
build_and_test.yml
File metadata and controls
73 lines (63 loc) · 2.15 KB
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
name: Build and test
on: [pull_request, workflow_dispatch]
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Install native dependecies
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace -- -Dclippy::all -Dclippy::pedantic
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Install rustfmt with nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all -- --check
Build-and-test-Fuzzer:
strategy:
matrix:
# os: [ubuntu-latest] #[ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, windows-latest] #[ubuntu-latest, windows-latest, macOS-latest]
# os: [windows-latest] #[ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 45
steps:
- name: Install Linux Packages
if: contains(matrix.os, 'ubuntu-latest')
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libc++-15-dev libc++abi-15-dev clang-15 ## libgtk-3-dev
- uses: actions/checkout@v4
name: Checkout repository
- name: use Windows developer command prompt
if: contains(matrix.os, 'windows-latest')
uses: ilammy/msvc-dev-cmd@v1
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
cache-on-failure: false
- name: Build debug
run: cargo build
- name: Run tests
run: cargo test --all-features --no-fail-fast