Merge tcharding/rust-psbt#40: Update rbmt to cargo subcommand version #168
This file contains hidden or 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
| --- # rust-psbt CI: If you edit this file please update README.md | |
| on: # yamllint disable-line rule:truthy | |
| 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 }} | |
| rbmt_version: ${{ steps.read_toolchain.outputs.rbmt_version }} | |
| steps: | |
| - name: "Checkout repo" | |
| uses: actions/checkout@v4 | |
| - name: "Read toolchain versions" | |
| id: read_toolchain | |
| run: | | |
| echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT | |
| echo "rbmt_version=$(cat rbmt-version)" >> $GITHUB_OUTPUT | |
| Stable: # 2 jobs, one per lock file. | |
| 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: "Select toolchain" | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: "Install rbmt" | |
| run: cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev $(cat rbmt-version) cargo-rbmt | |
| - name: "Run tests" | |
| run: cargo rbmt test stable --lock-file ${{ matrix.dep }} | |
| Nightly: # 2 jobs, one per lock file. | |
| 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: "Select toolchain" | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ needs.Prepare.outputs.nightly_version }} | |
| - name: "Install rbmt" | |
| run: cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev ${{ needs.Prepare.outputs.rbmt_version }} cargo-rbmt | |
| - name: "Run tests" | |
| run: cargo rbmt test nightly --lock-file ${{ matrix.dep }} | |
| MSRV: # 2 jobs, one per lock file. | |
| name: Test - MSRV toolchain | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dep: [minimal, recent] | |
| steps: | |
| - name: "Checkout repo" | |
| uses: actions/checkout@v4 | |
| - name: "Install stable toolchain" | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: "Install rbmt" | |
| run: cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev $(cat rbmt-version) cargo-rbmt | |
| - name: "Install MSRV toolchain" | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.74.0" | |
| - name: "Run tests" | |
| run: cargo rbmt test msrv --lock-file ${{ matrix.dep }} | |
| Lint: | |
| name: Lint - nightly toolchain | |
| needs: Prepare | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: "Checkout repo" | |
| uses: actions/checkout@v4 | |
| - name: "Select toolchain" | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ needs.Prepare.outputs.nightly_version }} | |
| - name: "Install clippy" | |
| run: rustup component add clippy | |
| - name: "Install rbmt" | |
| run: cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev ${{ needs.Prepare.outputs.rbmt_version }} cargo-rbmt | |
| - name: "Run lint" | |
| run: cargo rbmt lint | |
| Docs: | |
| name: Docs - stable toolchain | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: "Checkout repo" | |
| uses: actions/checkout@v4 | |
| - name: "Select toolchain" | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: "Install rbmt" | |
| run: cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev $(cat rbmt-version) cargo-rbmt | |
| - name: "Build docs" | |
| run: cargo rbmt docs | |
| Docsrs: | |
| name: Docs - nightly toolchain | |
| needs: Prepare | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: "Checkout repo" | |
| uses: actions/checkout@v4 | |
| - name: "Select toolchain" | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ needs.Prepare.outputs.nightly_version }} | |
| - name: "Install rbmt" | |
| run: cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev ${{ needs.Prepare.outputs.rbmt_version }} cargo-rbmt | |
| - name: "Build docs.rs docs" | |
| run: cargo rbmt docsrs | |
| Format: # 1 job, run cargo fmt directly. | |
| name: Format - nightly toolchain | |
| needs: Prepare | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: "Checkout repo" | |
| uses: actions/checkout@v4 | |
| - name: "Select toolchain" | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ needs.Prepare.outputs.nightly_version }} | |
| - name: "Install rustfmt" | |
| run: rustup component add rustfmt | |
| - name: "Check formatting" | |
| run: cargo fmt --all -- --check |