-
-
Notifications
You must be signed in to change notification settings - Fork 14
50 lines (40 loc) · 1.4 KB
/
cache-factory.yaml
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
# This workflow _produces_ caches which are used to speed up pull request builds.
# Originally from https://github.com/libp2p/rust-libp2p/blob/master/.github/workflows/cache-factory.yml
name: Cache Factory
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
make_cache:
name: "Make Cache"
runs-on: ${{ matrix.settings.host }}
strategy:
fail-fast: true
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
- host: macos-latest
target: aarch64-apple-darwin
- host: windows-latest
target: x86_64-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-rust
with:
save-cache: "true"
target: ${{ matrix.settings.target }}
- uses: ./.github/actions/install-desktop-deps
- run: mkdir apps/desktop/dist
- name: Clippy (debug)
run: cargo clippy --all --all-features --target ${{ matrix.settings.target }}
- name: Compile (debug)
run: cargo test --all --all-features --no-run --target ${{ matrix.settings.target }}
- name: Compile (release)
run: cargo test --all --all-features --no-run --target ${{ matrix.settings.target }} --release