Skip to content

Commit ec783e3

Browse files
Merge pull request #7241 from stacks-network/release/3.4.0.0.3
3.4.0.0.3 into master
2 parents a17e990 + 32b5f7c commit ec783e3

188 files changed

Lines changed: 13355 additions & 5817 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/bitcoin-int-tests/Dockerfile.atlas-test

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/actions/bitcoin-int-tests/Dockerfile.bitcoin-tests

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/actions/bitcoin-int-tests/Dockerfile.generic.bitcoin-tests

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/actions/bitcoin-int-tests/Dockerfile.large-genesis

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/actions/bitcoin-int-tests/Dockerfile.net-tests

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/actions/bitcoin-int-tests/Dockerfile.rustfmt

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Bitcoin Cache
2+
description: |
3+
Bitcoin binary cache
4+
5+
inputs:
6+
action:
7+
description: "Type of operation (check,restore,save)"
8+
required: false
9+
default: "check"
10+
fail-on-cache-miss:
11+
description: "Fail workflow if cache is not restorable"
12+
required: false
13+
default: "true"
14+
cache-key:
15+
description: "Cache Key name"
16+
required: false
17+
default: ${{ github.event.repository.name }}-${{ github.event.pull_request.head.sha || github.sha }}-bitcoin-binaries
18+
btc-version:
19+
description: "Bitcoin version"
20+
required: false
21+
default: "25.0"
22+
23+
outputs:
24+
cache-hit:
25+
description: "Cache Hit"
26+
value: ${{ steps.check_cache.outputs.cache-hit }}
27+
28+
runs:
29+
using: "composite"
30+
steps:
31+
# Check if cache data exists
32+
- name: Check Cache
33+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
34+
id: check_cache
35+
with:
36+
lookup-only: true
37+
path: ~/bitcoin
38+
key: ${{ inputs.cache-key }}-${{ inputs.btc-version }}
39+
40+
# Restore cache data
41+
- name: Restore Cache
42+
if: |
43+
inputs.action == 'restore' &&
44+
steps.check_cache.outputs.cache-hit == 'true'
45+
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
46+
with:
47+
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
48+
path: ~/bitcoin
49+
key: ${{ inputs.cache-key }}-${{ inputs.btc-version }}
50+
51+
# Install bitcoin binary on cache-miss
52+
- name: Install Bitcoin Binary
53+
if: |
54+
inputs.action == 'save' &&
55+
steps.check_cache.outputs.cache-hit != 'true'
56+
shell: bash
57+
run: |
58+
curl -LSf -# https://github.com/stacks-network/bitcoin/releases/download/v${{ inputs.btc-version }}/bitcoin-${{ inputs.btc-version }}-x86_64-linux-gnu.tar.gz | tar zxf - -C ~
59+
mv ~/bitcoin-${{ inputs.btc-version }} ~/bitcoin
60+
61+
# Save cache data
62+
- name: Save Cache
63+
if: |
64+
inputs.action == 'save' &&
65+
steps.check_cache.outputs.cache-hit != 'true'
66+
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
67+
with:
68+
path: ~/bitcoin
69+
key: ${{ inputs.cache-key }}-${{ inputs.btc-version }}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build Test Archive Caches
2+
description: |
3+
Builds nextest test archive cache
4+
5+
runs:
6+
using: "composite"
7+
steps:
8+
# Check if the target cache exists
9+
- name: Check Cargo Target Cache
10+
uses: ./.github/actions/cache/cargo-target
11+
id: check_target_cache
12+
13+
# Check if the nextest archive cache exists
14+
- name: Check Test Archive Cache
15+
uses: ./.github/actions/cache/test-archive
16+
id: check_test_archive_cache
17+
18+
# Setup rust toolchain
19+
- name: Setup Rust Toolchain
20+
if: |
21+
steps.check_target_cache.outputs.cache-hit != 'true' ||
22+
steps.check_test_archive_cache.outputs.cache-hit != 'true'
23+
uses: ./.github/actions/setup-rust-toolchain
24+
with:
25+
components: llvm-tools-preview
26+
27+
# Restore cargo cache
28+
- name: Restore Cargo Cache
29+
if: |
30+
steps.check_target_cache.outputs.cache-hit != 'true' ||
31+
steps.check_test_archive_cache.outputs.cache-hit != 'true'
32+
uses: ./.github/actions/cache/cargo
33+
with:
34+
action: restore
35+
36+
# Only install dependencies if cache miss (i.e. no existing data)
37+
- name: Install Dependencies
38+
if: |
39+
steps.check_target_cache.outputs.cache-hit != 'true' ||
40+
steps.check_test_archive_cache.outputs.cache-hit != 'true'
41+
uses: ./.github/actions/install-tool
42+
with:
43+
tool: nextest
44+
45+
# Build the nextest archive
46+
- name: Build and Archive Tests
47+
if: |
48+
steps.check_target_cache.outputs.cache-hit != 'true' ||
49+
steps.check_test_archive_cache.outputs.cache-hit != 'true'
50+
shell: bash
51+
run: |
52+
export RUSTFLAGS="-C instrument-coverage" && \
53+
cargo nextest archive \
54+
--workspace \
55+
--tests \
56+
--locked \
57+
--features monitoring_prom \
58+
--archive-file ~/test_archive.tar.zst
59+
60+
# Save the nextest archive to cache
61+
- name: Cache Nextest Archive
62+
if: |
63+
steps.check_target_cache.outputs.cache-hit != 'true' ||
64+
steps.check_test_archive_cache.outputs.cache-hit != 'true'
65+
uses: ./.github/actions/cache/test-archive
66+
with:
67+
action: save
68+
69+
# Save the target cache
70+
- name: Cache Cargo Target
71+
if: |
72+
steps.check_target_cache.outputs.cache-hit != 'true' ||
73+
steps.check_test_archive_cache.outputs.cache-hit != 'true'
74+
uses: ./.github/actions/cache/cargo-target
75+
with:
76+
action: save
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Target Cache
2+
description: |
3+
Rust target cache (used for codecov)
4+
5+
inputs:
6+
action:
7+
description: "Type of operation (restore,save)"
8+
required: false
9+
default: ""
10+
fail-on-cache-miss:
11+
description: "Fail workflow if cache is not restorable"
12+
required: false
13+
default: "true"
14+
cache-key:
15+
description: "Cache Key name"
16+
required: false
17+
default: ${{ github.event.repository.name }}-${{ github.event.pull_request.head.sha || github.sha }}-cargo
18+
19+
outputs:
20+
cache-hit:
21+
description: "Cache Hit"
22+
value: ${{ steps.check_cache.outputs.cache-hit }}
23+
24+
runs:
25+
using: "composite"
26+
steps:
27+
# Check if cache data exists
28+
- name: Check Cache
29+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
30+
id: check_cache
31+
with:
32+
lookup-only: true
33+
path: ./target
34+
key: ${{ inputs.cache-key }}
35+
36+
# Restore cache data
37+
- name: Restore Cache
38+
if: |
39+
inputs.action == 'restore'
40+
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
41+
with:
42+
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
43+
path: ./target
44+
key: ${{ inputs.cache-key }}
45+
46+
# Save cache data
47+
- name: Save Cache
48+
if: |
49+
inputs.action == 'save'
50+
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
51+
with:
52+
path: ./target
53+
key: ${{ inputs.cache-key }}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Cargo Cache
2+
description: |
3+
Rust Cargo cache
4+
5+
inputs:
6+
action:
7+
description: "Type of operation (restore,save)"
8+
required: false
9+
default: ""
10+
fail-on-cache-miss:
11+
description: "Fail workflow if cache is not restorable"
12+
required: false
13+
default: "true"
14+
cache-key:
15+
description: "Cache Key name"
16+
required: false
17+
default: ${{ github.event.repository.name }}-${{ github.event.pull_request.head.sha || github.sha }}-cargo
18+
19+
outputs:
20+
cache-hit:
21+
description: "Cache Hit"
22+
value: ${{ steps.check_cache.outputs.cache-hit }}
23+
24+
runs:
25+
using: "composite"
26+
steps:
27+
# Check if cache data exists
28+
- name: Check Cache
29+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
30+
id: check_cache
31+
with:
32+
lookup-only: true
33+
path: |
34+
~/.cargo/bin/
35+
~/.cargo/registry/index/
36+
~/.cargo/registry/cache/
37+
~/.cargo/git/db/
38+
key: ${{ inputs.cache-key }}
39+
40+
# Restore cache data
41+
- name: Restore Cache
42+
if: |
43+
inputs.action == 'restore' &&
44+
steps.check_cache.outputs.cache-hit == 'true'
45+
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
46+
with:
47+
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
48+
path: |
49+
~/.cargo/bin/
50+
~/.cargo/registry/index/
51+
~/.cargo/registry/cache/
52+
~/.cargo/git/db/
53+
key: ${{ inputs.cache-key }}
54+
55+
# Save cache data
56+
- name: Save Cache
57+
if: |
58+
inputs.action == 'save' &&
59+
steps.check_cache.outputs.cache-hit != 'true'
60+
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
61+
with:
62+
path: |
63+
~/.cargo/bin/
64+
~/.cargo/registry/index/
65+
~/.cargo/registry/cache/
66+
~/.cargo/git/db/
67+
key: ${{ inputs.cache-key }}

0 commit comments

Comments
 (0)