-
Notifications
You must be signed in to change notification settings - Fork 1
136 lines (108 loc) · 3.28 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- "renovate/**"
- "!renovate/lock-file-maintenance"
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: short
# RUSTFLAGS: '-D warnings -W unreachable-pub -W rust-2021-compatibility'
RUSTFLAGS: "-W unreachable-pub -W rust-2021-compatibility"
WTOOLS_AEAD_KEY: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
key: ${{ secrets.CLEAR_CACHE }}
- name: Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev librsvg2-dev
- name: Format
run: cargo fmt --all -- --check
- name: Compile
run: cargo test --no-run --locked
- name: Test
run: cargo test -- --nocapture --quiet
- name: Lints
run: cargo clippy
tauri:
strategy:
fail-fast: false
matrix:
settings:
- os: macos-latest
store: "~/Library/pnpm/store"
- os: ubuntu-latest
store: "~/.local/share/pnpm/store"
- os: windows-latest
store: "%LOCALAPPDATA%/pnpm/store"
name: tauri (${{ matrix.settings.os }})
runs-on: ${{ matrix.settings.os }}
steps:
- uses: actions/checkout@v4
- name: Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev librsvg2-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ secrets.CLEAR_CACHE }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ${{ matrix.settings.store }}
key: ${{ runner.os }}-pnpm-tauri-${{secrets.CLEAR_CACHE}}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-cache-${{secrets.CLEAR_CACHE}}-
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
- name: tauri build
run: cd gui && pnpm tauri build --debug --verbose
typescript:
runs-on: ubuntu-latest
defaults:
run:
working-directory: gui
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.local/share/pnpm/store
key: ${{ runner.os }}-pnpm-typescript-${{secrets.CLEAR_CACHE}}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-cache-${{secrets.CLEAR_CACHE}}-
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
- name: Types
run: pnpm tsc
- name: Format
run: pnpm fmt
- name: Lints
run: pnpm lint
- name: Test
run: pnpm test