forked from tauri-apps/tauri
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (93 loc) · 3.61 KB
/
udeps.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
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: Udeps
on:
pull_request:
paths:
- '.github/workflows/udeps.yml'
- 'core/**'
- 'tooling/bundler/**'
- 'tooling/cli.rs/**'
jobs:
udeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Cache cargo registry
uses: actions/[email protected]
with:
path: ~/.cargo/registry
# Add date to the cache to keep it up to date
key: ubuntu-latest-nightly-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-nightly-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
ubuntu-latest-nightly-cargo-registry-
- name: Cache cargo index
uses: actions/[email protected]
with:
path: ~/.cargo/git
# Add date to the cache to keep it up to date
key: ubuntu-latest-nightly-cargo-index-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-nightly-cargo-index-${{ hashFiles('**/Cargo.toml') }}
ubuntu-latest-nightly-cargo-index-
- name: Cache core cargo target
uses: actions/cache@v2
with:
path: target
# Add date to the cache to keep it up to date
key: ubuntu-latest-nightly-cargo-core-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-nightly-cargo-core-${{ hashFiles('core/**/Cargo.toml') }}
ubuntu-latest-nightly-cargo-core-
- name: Cache bundler cargo target
uses: actions/cache@v2
with:
path: tooling/bundler/target
# Add date to the cache to keep it up to date
key: ubuntu-latest-nightly-cargo-bundler-${{ hashFiles('tooling/bundler/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-nightly-cargo-bundler-${{ hashFiles('tooling/bundler/Cargo.lock') }}
ubuntu-latest-nightly-cargo-bundler-
- name: Cache CLI cargo target
uses: actions/cache@v2
with:
path: tooling/cli.rs/target
# Add date to the cache to keep it up to date
key: ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}
ubuntu-latest-nightly-cargo-cli-
- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-udeps --locked
- name: Install required packages
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- uses: actions-rs/cargo@v1
with:
command: udeps
args: --all-targets --all-features
- uses: actions-rs/cargo@v1
with:
command: udeps
args: --manifest-path ./tooling/bundler/Cargo.toml --all-targets --all-features
- uses: actions-rs/cargo@v1
with:
command: udeps
args: --manifest-path ./tooling/cli.rs/Cargo.toml --all-targets --all-features