-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: CI: Use script from rust-bitcoin-maintainer-tools
WIP remember to fix integration test job. We have a CI script in the `rust-bitcoin-maintainer-tools` repository, lets use it.
- Loading branch information
Showing
6 changed files
with
132 additions
and
92 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 |
---|---|---|
@@ -1,62 +1,102 @@ | ||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'test-ci/**' | ||
pull_request: | ||
|
||
name: Continuous integration | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- rust: stable | ||
env: | ||
RUSTFMTCHK: true | ||
- rust: nightly | ||
env: | ||
RUSTFMTCHK: false | ||
- rust: 1.56.1 | ||
env: | ||
RUSTFMTCHK: false | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v2 | ||
- name: Checkout Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: Running test script | ||
env: ${{ matrix.env }} | ||
run: ./contrib/test.sh | ||
Prepare: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }} | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Read nightly version" | ||
id: read_toolchain | ||
run: echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT | ||
|
||
integrations-tests: | ||
name: Integration Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [stable] | ||
bitcoinversion: | ||
[ | ||
"0.18.0", | ||
"0.18.1", | ||
"0.19.0.1", | ||
"0.19.1", | ||
"0.20.0", | ||
"0.20.1", | ||
"0.21.0", | ||
] | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v2 | ||
- name: Checkout Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: Running test script | ||
env: | ||
BITCOINVERSION: ${{ matrix.bitcoinversion }} | ||
run: ./contrib/test.sh | ||
Stable: # 2 jobs, one per lock file. | ||
needs: Prepare | ||
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: "Set dependencies" | ||
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 lock file. | ||
# needs: Prepare | ||
# name: Test - nightly toolchain | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# dep: [minimal, recent] | ||
# steps: | ||
# - name: "Checkout repo" | ||
# uses: actions/checkout@v4 | ||
# - name: "Select toolchain" | ||
# uses: dtolnay/rust-toolchain@v1 | ||
# with: | ||
# toolchain: ${{ needs.Prepare.outputs.nightly_version }} | ||
# - name: "Set dependencies" | ||
# 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 lock file. | ||
# needs: Prepare | ||
# name: Test - 1.56.1 toolchain | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# dep: [minimal, recent] | ||
# steps: | ||
# - name: "Checkout repo" | ||
# uses: actions/checkout@v4 | ||
# - 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 | ||
|
||
# Format: # 1 jobs, uses recent lock file. | ||
# needs: Prepare | ||
# name: Format - stable toolchain | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# dep: [recent] | ||
# steps: | ||
# - name: "Checkout repo" | ||
# uses: actions/checkout@v4 | ||
# - name: "Select toolchain" | ||
# uses: dtolnay/rust-toolchain@stable | ||
# - name: "Set dependencies" | ||
# run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
# - name: "Check formatting" | ||
# run: ./maintainer-tools/ci/run_task.sh fmt |
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,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Test all these features with "std" enabled. | ||
FEATURES_WITH_STD="" | ||
|
||
# Test all these features without "std" enabled. | ||
FEATURES_WITHOUT_STD="" | ||
|
||
# Run these examples. | ||
EXAMPLES="" |
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,12 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Do pinning as required for current MSRV. | ||
|
||
set -euo pipefail | ||
|
||
cargo update -p tempfile --precise 3.6.0 | ||
cargo update -p cc --precise 1.0.79 | ||
cargo update -p log --precise 0.4.18 | ||
cargo update -p serde_json --precise 1.0.96 | ||
cargo update -p serde --precise 1.0.156 | ||
|
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
CRATES="json client" | ||
|
||
# Test all these features with "std" enabled. | ||
FEATURES_WITH_STD="" | ||
|
||
# Test all these features without "std" enabled. | ||
FEATURES_WITHOUT_STD="" | ||
|
||
# Run these examples. | ||
EXAMPLES="retry_client" |
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 @@ | ||
nightly-2024-04-30 |