Skip to content

Commit fb36ec8

Browse files
committed
updating latest rust bitcoin version for coordinate
1 parent cda7b85 commit fb36ec8

39 files changed

+1256
-98
lines changed

.actrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-e contrib/act/event.json

.cargo-ok

Whitespace-only changes.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.rs diff=rust

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Set update schedule for GitHub Actions
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
# Check for updates to GitHub Actions every week
8+
interval: "weekly"

.github/labeler.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ci:
2+
- changed-files:
3+
- any-glob-to-any-file: .github/**
4+
test:
5+
- changed-files:
6+
- any-glob-to-any-file: fuzz/**
7+
- any-glob-to-any-file: '*/tests/**'
8+
- any-glob-to-any-file: 'dep_test'
9+
- any-glob-to-any-file: 'contrib/run_task.sh'
10+
- any-glob-to-any-file: 'contrib/test_vars.sh'
11+
- any-glob-to-any-file: '*/contrib/extra_tests.sh'
12+
- any-glob-to-any-file: '*/contrib/test_vars.sh'
13+
doc:
14+
- changed-files:
15+
- any-glob-to-any-file: '**/*.md'

.github/workflows/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# rust-bitcoin workflow notes
2+
3+
We are attempting to run max 20 parallel jobs using GitHub actions (usage limit for free tier).
4+
5+
ref: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration
6+
7+
The minimal/recent lock files are handled by CI (`rust.yml`).
8+
9+
## Jobs
10+
11+
Run from rust.yml unless stated otherwise. Unfortunately we are now exceeding the 20 job target.
12+
(Prepare is quick and must be run first anyway.)
13+
14+
0. `Prepare`
15+
1. `Stable - minimal`
16+
2. `Stable - recent`
17+
3. `Nightly - minimal`
18+
4. `Nightly - recent`
19+
5. `MSRV - minimal`
20+
6. `MSRV - recent`
21+
7. `Lint`
22+
8. `Docs`
23+
9. `Docsrs`
24+
10. `Bench`
25+
11. `ASAN`
26+
12. `WASM`
27+
13. `Arch32bit`
28+
14. `Cross`
29+
15. `Embedded`
30+
16. `Kani`
31+
17. `Coveralls` - run by `coveralls.yml`
32+
18. `release` - run by `release.yml`
33+
19. `labeler` - run by `manage-pr.yml`
34+
20. `Shellcheck` - run by `shellcheck.yml`
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.38.0

.github/workflows/coveralls.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
- push
3+
- pull_request
4+
5+
name: Code coverage with llvm-cov
6+
7+
jobs:
8+
Coveralls:
9+
name: Code coverage - stable toolchain
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
steps:
14+
- name: Checkout Crate
15+
uses: actions/checkout@v4
16+
- name: Checkout Toolchain
17+
# https://github.com/dtolnay/rust-toolchain
18+
uses: dtolnay/rust-toolchain@stable
19+
- name: Install cargo-llvm-cov
20+
uses: taiki-e/install-action@cargo-llvm-cov
21+
- name: Generate code coverage for tests
22+
run: cargo llvm-cov --ignore-filename-regex fuzz --all-features --workspace --lcov --output-path lcov.info
23+
- name: Upload report to coveralls
24+
uses: coverallsapp/github-action@v2
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Automatically generated by fuzz/generate-files.sh
2+
name: Fuzz
3+
on:
4+
schedule:
5+
# 5am every day UTC, this correlates to:
6+
# - 10pm PDT
7+
# - 6am CET
8+
# - 4pm AEDT
9+
- cron: '00 05 * * *'
10+
11+
jobs:
12+
fuzz:
13+
if: ${{ !github.event.act }}
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
# We only get 20 jobs at a time, we probably don't want to go
19+
# over that limit with fuzzing because of the hour run time.
20+
fuzz_target: [
21+
bitcoin_deserialize_address,
22+
bitcoin_deserialize_block,
23+
bitcoin_deserialize_prefilled_transaction,
24+
bitcoin_deserialize_psbt,
25+
bitcoin_deserialize_script,
26+
bitcoin_deserialize_transaction,
27+
bitcoin_deserialize_witness,
28+
bitcoin_deser_net_msg,
29+
bitcoin_outpoint_string,
30+
bitcoin_script_bytes_to_asm_fmt,
31+
hashes_json,
32+
hashes_ripemd160,
33+
hashes_sha1,
34+
hashes_sha256,
35+
hashes_sha512_256,
36+
hashes_sha512,
37+
units_deserialize_amount,
38+
]
39+
steps:
40+
- name: Install test dependencies
41+
run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev
42+
- uses: actions/checkout@v4
43+
- uses: actions/cache@v4
44+
id: cache-fuzz
45+
with:
46+
path: |
47+
~/.cargo/bin
48+
fuzz/target
49+
target
50+
key: cache-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
51+
- uses: dtolnay/rust-toolchain@stable
52+
with:
53+
toolchain: '1.65.0'
54+
- name: fuzz
55+
run: |
56+
if [[ "${{ matrix.fuzz_target }}" =~ ^bitcoin ]]; then
57+
export RUSTFLAGS='--cfg=hashes_fuzz --cfg=secp256k1_fuzz'
58+
fi
59+
echo "Using RUSTFLAGS $RUSTFLAGS"
60+
cd fuzz && ./fuzz.sh "${{ matrix.fuzz_target }}"
61+
- run: echo "${{ matrix.fuzz_target }}" >executed_${{ matrix.fuzz_target }}
62+
- uses: actions/upload-artifact@v3
63+
with:
64+
name: executed_${{ matrix.fuzz_target }}
65+
path: executed_${{ matrix.fuzz_target }}
66+
67+
verify-execution:
68+
if: ${{ !github.event.act }}
69+
needs: fuzz
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
- uses: actions/download-artifact@v3
74+
- name: Display structure of downloaded files
75+
run: ls -R
76+
- run: find executed_* -type f -exec cat {} + | sort > executed
77+
- run: source ./fuzz/fuzz-util.sh && listTargetNames | sort | diff - executed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# From https://model-checking.github.io/kani/install-github-ci.html
2+
name: Kani CI
3+
on:
4+
schedule:
5+
- cron: '59 23 * * *' # midnight every day.
6+
jobs:
7+
run-kani:
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: 'Checkout your code.'
11+
uses: actions/checkout@v4
12+
13+
- name: 'Run Kani on your code.'
14+
uses: model-checking/[email protected]

0 commit comments

Comments
 (0)