This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (86 loc) · 2.36 KB
/
test.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
name: Test
on:
push:
branches:
- main
pull_request:
jobs:
Restore-Cache-Miss:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
path: rust-sccache-action
- name: Installing Rust
uses: dtolnay/rust-toolchain@stable
- uses: ./rust-sccache-action
id: cache
with:
shared-key: ${{ github.run_id }}-${{ github.run_attempt }}
skip-save: true
autoclean: true
- run: mkdir target
- env:
CACHE_HIT: ${{ steps.cache.outputs.cache-hit }}
run: |
if [[ "$CACHE_HIT" != 'false' ]]; then
echo 'Cache was hit, but it should not have been.'
exit 1
fi
Restore-Save-Cache-Miss:
needs: [Restore-Cache-Miss]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
path: rust-sccache-action
- name: Installing Rust
uses: dtolnay/rust-toolchain@stable
- uses: ./rust-sccache-action
id: cache
with:
shared-key: ${{ github.run_id }}-${{ github.run_attempt }}
skip-save: false
autoclean: true
- run: mkdir target
- env:
CACHE_HIT: ${{ steps.cache.outputs.cache-hit }}
run: |
if [[ "$CACHE_HIT" != 'false' ]]; then
echo 'Cache was hit, but it should not have been.'
exit 1
fi
Cache-Hit:
needs: [Restore-Save-Cache-Miss]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
skip-save: [true, false]
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
path: rust-sccache-action
- name: Installing Rust
uses: dtolnay/rust-toolchain@stable
- uses: ./rust-sccache-action
id: cache
with:
shared-key: ${{ github.run_id }}-${{ github.run_attempt }}
skip-save: ${{ matrix.skip-save }}
- env:
CACHE_HIT: ${{ steps.cache.outputs.cache-hit }}
run: |
if [[ "$CACHE_HIT" != 'true' ]]; then
echo 'Cache was missed, but it should not have been.'
exit 1
fi