|
| 1 | +--- # rust-ordered CI: If you edit this file please update README.md |
| 2 | +on: # yamllint disable-line rule:truthy |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + - 'test-ci/**' |
| 7 | + pull_request: |
| 8 | + |
| 9 | +name: Continuous integration |
| 10 | + |
| 11 | +jobs: |
| 12 | + Prepare: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + outputs: |
| 15 | + nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }} |
| 16 | + steps: |
| 17 | + - name: "Checkout repo" |
| 18 | + uses: actions/checkout@v4 |
| 19 | + - name: "Read nightly version" |
| 20 | + id: read_toolchain |
| 21 | + run: echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT |
| 22 | + |
| 23 | + Stable: # 2 jobs, one per manifest. |
| 24 | + name: Test - stable toolchain |
| 25 | + runs-on: ubuntu-latest |
| 26 | + strategy: |
| 27 | + fail-fast: false |
| 28 | + matrix: |
| 29 | + dep: [minimal, recent] |
| 30 | + steps: |
| 31 | + - name: "Checkout repo" |
| 32 | + uses: actions/checkout@v4 |
| 33 | + - name: "Checkout maintainer tools" |
| 34 | + uses: actions/checkout@v4 |
| 35 | + with: |
| 36 | + repository: rust-bitcoin/rust-bitcoin-maintainer-tools |
| 37 | + ref: 4f17a059a2f57c1b99b7c240a1467a5c0acebdc3 |
| 38 | + path: maintainer-tools |
| 39 | + - name: "Select toolchain" |
| 40 | + uses: dtolnay/rust-toolchain@stable |
| 41 | + - name: "Set dependencies" |
| 42 | + run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock |
| 43 | + - name: "Run test script" |
| 44 | + run: ./maintainer-tools/ci/run_task.sh stable |
| 45 | + |
| 46 | + Nightly: # 2 jobs, one per manifest. |
| 47 | + name: Test - nightly toolchain |
| 48 | + needs: Prepare |
| 49 | + runs-on: ubuntu-latest |
| 50 | + strategy: |
| 51 | + fail-fast: false |
| 52 | + matrix: |
| 53 | + dep: [minimal, recent] |
| 54 | + steps: |
| 55 | + - name: "Checkout repo" |
| 56 | + uses: actions/checkout@v4 |
| 57 | + - name: "Checkout maintainer tools" |
| 58 | + uses: actions/checkout@v4 |
| 59 | + with: |
| 60 | + repository: rust-bitcoin/rust-bitcoin-maintainer-tools |
| 61 | + ref: 4f17a059a2f57c1b99b7c240a1467a5c0acebdc3 |
| 62 | + path: maintainer-tools |
| 63 | + - name: "Select toolchain" |
| 64 | + uses: dtolnay/rust-toolchain@v1 |
| 65 | + with: |
| 66 | + toolchain: ${{ needs.Prepare.outputs.nightly_version }} |
| 67 | + - name: "Set dependencies" |
| 68 | + run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock |
| 69 | + - name: "Run test script" |
| 70 | + run: ./maintainer-tools/ci/run_task.sh nightly |
| 71 | + |
| 72 | + MSRV: # 2 jobs, one per manifest. |
| 73 | + name: Test - MSRV toolchain |
| 74 | + runs-on: ubuntu-latest |
| 75 | + strategy: |
| 76 | + fail-fast: false |
| 77 | + matrix: |
| 78 | + dep: [minimal, recent] |
| 79 | + steps: |
| 80 | + - name: "Checkout repo" |
| 81 | + uses: actions/checkout@v4 |
| 82 | + - name: "Checkout maintainer tools" |
| 83 | + uses: actions/checkout@v4 |
| 84 | + with: |
| 85 | + repository: rust-bitcoin/rust-bitcoin-maintainer-tools |
| 86 | + ref: 4f17a059a2f57c1b99b7c240a1467a5c0acebdc3 |
| 87 | + path: maintainer-tools |
| 88 | + - name: "Select toolchain" |
| 89 | + uses: dtolnay/rust-toolchain@stable |
| 90 | + with: |
| 91 | + toolchain: "1.63.0" |
| 92 | + - name: "Set dependencies" |
| 93 | + run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock |
| 94 | + - name: "Run test script" |
| 95 | + run: ./maintainer-tools/ci/run_task.sh msrv |
| 96 | + |
| 97 | + Lint: |
| 98 | + name: Lint - nightly toolchain |
| 99 | + needs: Prepare |
| 100 | + runs-on: ubuntu-latest |
| 101 | + strategy: |
| 102 | + fail-fast: false |
| 103 | + matrix: |
| 104 | + dep: [recent] |
| 105 | + steps: |
| 106 | + - name: "Checkout repo" |
| 107 | + uses: actions/checkout@v4 |
| 108 | + - name: "Checkout maintainer tools" |
| 109 | + uses: actions/checkout@v4 |
| 110 | + with: |
| 111 | + repository: rust-bitcoin/rust-bitcoin-maintainer-tools |
| 112 | + ref: 4f17a059a2f57c1b99b7c240a1467a5c0acebdc3 |
| 113 | + path: maintainer-tools |
| 114 | + - name: "Select toolchain" |
| 115 | + uses: dtolnay/rust-toolchain@v1 |
| 116 | + with: |
| 117 | + toolchain: ${{ needs.Prepare.outputs.nightly_version }} |
| 118 | + - name: "Install clippy" |
| 119 | + run: rustup component add clippy |
| 120 | + - name: "Set dependencies" |
| 121 | + run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock |
| 122 | + - name: "Run test script" |
| 123 | + run: ./maintainer-tools/ci/run_task.sh lint |
| 124 | + |
| 125 | + Docs: |
| 126 | + name: Docs - stable toolchain |
| 127 | + runs-on: ubuntu-latest |
| 128 | + strategy: |
| 129 | + fail-fast: false |
| 130 | + matrix: |
| 131 | + dep: [recent] |
| 132 | + steps: |
| 133 | + - name: "Checkout repo" |
| 134 | + uses: actions/checkout@v4 |
| 135 | + - name: "Checkout maintainer tools" |
| 136 | + uses: actions/checkout@v4 |
| 137 | + with: |
| 138 | + repository: rust-bitcoin/rust-bitcoin-maintainer-tools |
| 139 | + ref: 4f17a059a2f57c1b99b7c240a1467a5c0acebdc3 |
| 140 | + path: maintainer-tools |
| 141 | + - name: "Select toolchain" |
| 142 | + uses: dtolnay/rust-toolchain@stable |
| 143 | + - name: "Set dependencies" |
| 144 | + run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock |
| 145 | + - name: "Run test script" |
| 146 | + run: ./maintainer-tools/ci/run_task.sh docs |
| 147 | + |
| 148 | + Docsrs: |
| 149 | + name: Docs - nightly toolchain |
| 150 | + needs: Prepare |
| 151 | + runs-on: ubuntu-latest |
| 152 | + strategy: |
| 153 | + fail-fast: false |
| 154 | + matrix: |
| 155 | + dep: [recent] |
| 156 | + steps: |
| 157 | + - name: "Checkout repo" |
| 158 | + uses: actions/checkout@v4 |
| 159 | + - name: "Checkout maintainer tools" |
| 160 | + uses: actions/checkout@v4 |
| 161 | + with: |
| 162 | + repository: rust-bitcoin/rust-bitcoin-maintainer-tools |
| 163 | + ref: 4f17a059a2f57c1b99b7c240a1467a5c0acebdc3 |
| 164 | + path: maintainer-tools |
| 165 | + - name: "Select toolchain" |
| 166 | + uses: dtolnay/rust-toolchain@v1 |
| 167 | + with: |
| 168 | + toolchain: ${{ needs.Prepare.outputs.nightly_version }} |
| 169 | + - name: "Set dependencies" |
| 170 | + run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock |
| 171 | + - name: "Run test script" |
| 172 | + run: ./maintainer-tools/ci/run_task.sh docsrs |
0 commit comments