-
Notifications
You must be signed in to change notification settings - Fork 671
60 lines (53 loc) · 1.66 KB
/
create-cache.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
## Github workflow to create reusable caches
name: Create Test Cache
on:
workflow_dispatch:
workflow_call:
## env vars are transferred to composite action steps
env:
RUSTFLAGS: "-Cinstrument-coverage -Awarnings"
LLVM_PROFILE_FILE: "stacks-core-%p-%m.profraw"
BTC_VERSION: "0.20.0"
##
## Cache will exist longer than workflow execution so other runners have access
## ex: a failed job should have access to the cache for however long `cleanup.yml` is set to delete old caches
## however, this is only relevant if the commit sha does not change between runs
concurrency:
group: create-cache-${{ github.head_ref || github.ref || github.run_id}}
## Only cancel in progress if this is for a PR
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
## Cache cargo data
cargo:
name: Cargo
runs-on: ubuntu-latest
steps:
## Perform a lookup to check if the cache already exists
- name: Cargo Cache
id: cargo-cache
uses: stacks-network/actions/stacks-core/cache/cargo@main
with:
action: save
## Cache the bitcoin binary
bitcoin-binary:
name: Bitcoin Binary
runs-on: ubuntu-latest
steps:
- name: Bitcoin Cache
id: bitcoin-cache
uses: stacks-network/actions/stacks-core/cache/bitcoin@main
with:
action: save
btc-version: "25.0"
## Cache nextest archives for tests
nextest-archive:
name: Test Archive
runs-on: ubuntu-latest
needs:
- cargo
steps:
- name: Build Nexttest Cache
id: nextest-cache
uses: stacks-network/actions/stacks-core/cache/build-cache@main
with:
genesis: true