This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use `rust-bitcoin-maintainer-tools` and add a workflow.
- Loading branch information
Showing
5 changed files
with
363 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,213 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'test-ci/**' | ||
pull_request: | ||
|
||
name: Continuous integration | ||
|
||
jobs: | ||
Prepare: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }} | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v4 | ||
- name: Read nightly version | ||
id: read_toolchain | ||
run: echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT | ||
|
||
|
||
Stable: # 2 jobs, one per manifest. | ||
name: Test - stable toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [minimal, recent] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: tcharding/rust-bitcoin-maintainer-tools | ||
ref: 05-02-ci | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: "Copy lock file" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh stable | ||
|
||
Nightly: # 2 jobs, one per manifest. | ||
name: Test - nightly toolchain | ||
needs: Prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [minimal, recent] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: tcharding/rust-bitcoin-maintainer-tools | ||
ref: 05-02-ci | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ needs.Prepare.outputs.nightly_version }} | ||
- name: "Copy lock file" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh nightly | ||
|
||
MSRV: # 2 jobs, one per manifest. | ||
name: Test - 1.56.1 toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [minimal] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: tcharding/rust-bitcoin-maintainer-tools | ||
ref: 05-02-ci | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: "1.56.1" | ||
- name: "Copy lock file" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh msrv | ||
|
||
Lint: | ||
name: Lint - nightly toolchain | ||
needs: Prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [recent] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: tcharding/rust-bitcoin-maintainer-tools | ||
ref: 05-02-ci | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ needs.Prepare.outputs.nightly_version }} | ||
- name: Install clippy | ||
run: rustup component add clippy | ||
- name: "Copy lock file" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh lint | ||
|
||
Docs: | ||
name: Docs - stable toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [recent] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: tcharding/rust-bitcoin-maintainer-tools | ||
ref: 05-02-ci | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: "Copy lock file" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh docs | ||
|
||
Docsrs: | ||
name: Docs - nightly toolchain | ||
needs: Prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [recent] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: tcharding/rust-bitcoin-maintainer-tools | ||
ref: 05-02-ci | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ needs.Prepare.outputs.nightly_version }} | ||
- name: "Copy lock file" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh docsrs | ||
|
||
Bench: | ||
name: Bench - nightly toolchain | ||
needs: Prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [recent] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: tcharding/rust-bitcoin-maintainer-tools | ||
ref: 05-02-ci | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ needs.Prepare.outputs.nightly_version }} | ||
- name: "Copy lock file" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh bench | ||
|
||
Format: # 1 job, run cargo fmt directly. | ||
name: Format - nightly toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@nightly | ||
- name: "Install rustfmt" | ||
run: rustup component add rustfmt | ||
- name: "Check formatting" | ||
run: cargo +nightly fmt --all -- --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
# This file is automatically @generated by Cargo. | ||
# It is not intended for manual editing. | ||
version = 3 | ||
|
||
[[package]] | ||
name = "arrayvec" | ||
version = "0.7.4" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" | ||
|
||
[[package]] | ||
name = "bitcoin-io" | ||
version = "0.1.2" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" | ||
|
||
[[package]] | ||
name = "chf" | ||
version = "0.1.0" | ||
dependencies = [ | ||
"bitcoin-io", | ||
"hex-conservative", | ||
"schemars", | ||
"serde", | ||
"serde_json", | ||
"serde_test", | ||
] | ||
|
||
[[package]] | ||
name = "dyn-clone" | ||
version = "1.0.17" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" | ||
|
||
[[package]] | ||
name = "hex-conservative" | ||
version = "0.2.0" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "e1aa273bf451e37ed35ced41c71a5e2a4e29064afb104158f2514bcd71c2c986" | ||
dependencies = [ | ||
"arrayvec", | ||
] | ||
|
||
[[package]] | ||
name = "itoa" | ||
version = "1.0.11" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" | ||
|
||
[[package]] | ||
name = "proc-macro2" | ||
version = "1.0.81" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" | ||
dependencies = [ | ||
"unicode-ident", | ||
] | ||
|
||
[[package]] | ||
name = "quote" | ||
version = "1.0.36" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" | ||
dependencies = [ | ||
"proc-macro2", | ||
] | ||
|
||
[[package]] | ||
name = "ryu" | ||
version = "1.0.17" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" | ||
|
||
[[package]] | ||
name = "schemars" | ||
version = "0.8.17" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "7f55c82c700538496bdc329bb4918a81f87cc8888811bd123cf325a0f2f8d309" | ||
dependencies = [ | ||
"dyn-clone", | ||
"serde", | ||
"serde_json", | ||
] | ||
|
||
[[package]] | ||
name = "serde" | ||
version = "1.0.156" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4" | ||
dependencies = [ | ||
"serde_derive", | ||
] | ||
|
||
[[package]] | ||
name = "serde_derive" | ||
version = "1.0.156" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d" | ||
dependencies = [ | ||
"proc-macro2", | ||
"quote", | ||
"syn", | ||
] | ||
|
||
[[package]] | ||
name = "serde_json" | ||
version = "1.0.96" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" | ||
dependencies = [ | ||
"itoa", | ||
"ryu", | ||
"serde", | ||
] | ||
|
||
[[package]] | ||
name = "serde_test" | ||
version = "1.0.176" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "5a2f49ace1498612d14f7e0b8245519584db8299541dfe31a06374a828d620ab" | ||
dependencies = [ | ||
"serde", | ||
] | ||
|
||
[[package]] | ||
name = "syn" | ||
version = "1.0.109" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" | ||
dependencies = [ | ||
"proc-macro2", | ||
"quote", | ||
"unicode-ident", | ||
] | ||
|
||
[[package]] | ||
name = "unicode-ident" | ||
version = "1.0.12" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Crates in this workspace to test (excl. fuzz an integration-tests). | ||
CRATES=(".") # Non-workspaces don't have crates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Test all these features with "std" enabled. | ||
FEATURES_WITH_STD="io serde small-hash schemars" | ||
FEATURES_WITH_STD="serde small-hash schemars" | ||
|
||
# Test all these features without "std" enabled. | ||
FEATURES_WITHOUT_STD="alloc serde small-hash" | ||
|
||
# Run address sanitizer with these features. | ||
ASAN_FEATURES="std io serde" | ||
FEATURES_WITHOUT_STD="io serde small-hash schemars" | ||
|
||
# Run and lint these examples. | ||
EXAMPLES="" |