-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (76 loc) · 2.52 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
---
name: Continuous Integration
on: workflow_dispatch
#on:
# push:
# branches:
# - main
# paths-ignore:
# - "**/README.md"
# - "**/build-release.yaml"
# pull_request:
# paths-ignore:
# - "**/README.md"
# - "**/build-release.yaml"
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
cargo-checks:
name: cargo ${{ matrix.action.command }} - ${{ matrix.job.os }}
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
matrix:
job:
- os: macos-latest
os-name: macos
- os: ubuntu-20.04
os-name: linux
- os: windows-latest
os-name: windows
binary-postfix: ".exe"
action:
- command: build
args: --release
- command: fmt
args: --all -- --check
# Temporarly disable clippy
# - command: clippy
# args: --all-targets --all-features --workspace -- -D warnings
- command: doc
args: --no-deps --document-private-items --all-features --workspace --examples
steps:
- name: Install dependencies
if: ${{ matrix.job.os == 'ubuntu-20.04' }}
run: |
sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install libudev-dev libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Enable caching
uses: Swatinem/rust-cache@v2
- name: Cargo command
run: cd src-tauri && cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
msrv:
name: MSRV check
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
run: |
sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install libudev-dev libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.67.1
- name: Enable caching
uses: Swatinem/rust-cache@v2
- name: Cargo check
run: cd src-tauri && cargo check