|
1 |
| -on: [push, pull_request] |
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: |
| 4 | + - master |
| 5 | + - 'test-ci/**' |
| 6 | + pull_request: |
2 | 7 |
|
3 | 8 | name: Continuous integration
|
4 | 9 |
|
5 | 10 | jobs:
|
6 |
| - tests: |
7 |
| - name: Tests |
| 11 | + Stable: # 2 jobs, one per lock file. |
| 12 | + name: Test - stable toolchain |
8 | 13 | runs-on: ubuntu-latest
|
9 | 14 | strategy:
|
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + dep: [minimal, recent] |
| 18 | + steps: |
| 19 | + - name: "Checkout repo" |
| 20 | + uses: actions/checkout@v4 |
| 21 | + - name: "Checkout maintainer tools" |
| 22 | + uses: actions/checkout@v4 |
| 23 | + with: |
| 24 | + repository: tcharding/rust-bitcoin-maintainer-tools |
| 25 | + ref: 05-02-ci |
| 26 | + path: maintainer-tools |
| 27 | + - name: "Select toolchain" |
| 28 | + uses: dtolnay/rust-toolchain@stable |
| 29 | + - name: "Copy lock file" |
| 30 | + run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock |
| 31 | + - name: "Run test script" |
| 32 | + run: ./maintainer-tools/ci/run_task.sh stable |
| 33 | + |
| 34 | + Nightly: # 2 jobs, one per lock file. |
| 35 | + name: Test - nightly toolchain |
| 36 | + runs-on: ubuntu-latest |
| 37 | + strategy: |
| 38 | + fail-fast: false |
10 | 39 | matrix:
|
11 |
| - include: |
12 |
| - - rust: stable |
13 |
| - env: |
14 |
| - RUSTFMTCHK: true |
15 |
| - - rust: nightly |
16 |
| - env: |
17 |
| - RUSTFMTCHK: false |
18 |
| - - rust: 1.56.1 |
19 |
| - env: |
20 |
| - RUSTFMTCHK: false |
| 40 | + dep: [minimal, recent] |
21 | 41 | steps:
|
22 |
| - - name: Checkout Crate |
23 |
| - uses: actions/checkout@v2 |
24 |
| - - name: Checkout Toolchain |
25 |
| - uses: actions-rs/toolchain@v1 |
| 42 | + - name: "Checkout repo" |
| 43 | + uses: actions/checkout@v4 |
| 44 | + - name: "Checkout maintainer tools" |
| 45 | + uses: actions/checkout@v4 |
26 | 46 | with:
|
27 |
| - profile: minimal |
28 |
| - toolchain: ${{ matrix.rust }} |
29 |
| - override: true |
30 |
| - - name: Running test script |
31 |
| - env: ${{ matrix.env }} |
32 |
| - run: ./contrib/test.sh |
| 47 | + repository: tcharding/rust-bitcoin-maintainer-tools |
| 48 | + ref: 05-02-ci |
| 49 | + path: maintainer-tools |
| 50 | + - name: "Select toolchain" |
| 51 | + uses: dtolnay/rust-toolchain@nightly |
| 52 | + - name: "Copy lock file" |
| 53 | + run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock |
| 54 | + - name: "Run test script" |
| 55 | + run: ./maintainer-tools/ci/run_task.sh nightly |
| 56 | + |
| 57 | + MSRV: # 2 jobs, one per lock file. |
| 58 | + name: Test - 1.56.1 toolchain |
| 59 | + runs-on: ubuntu-latest |
| 60 | + strategy: |
| 61 | + fail-fast: false |
| 62 | + matrix: |
| 63 | + dep: [minimal, recent] |
| 64 | + steps: |
| 65 | + - name: "Checkout repo" |
| 66 | + uses: actions/checkout@v4 |
| 67 | + - name: "Checkout maintainer tools" |
| 68 | + uses: actions/checkout@v4 |
| 69 | + with: |
| 70 | + repository: tcharding/rust-bitcoin-maintainer-tools |
| 71 | + ref: 05-02-ci |
| 72 | + path: maintainer-tools |
| 73 | + - name: "Select toolchain" |
| 74 | + uses: dtolnay/rust-toolchain@stable |
| 75 | + with: |
| 76 | + toolchain: "1.56.1" |
| 77 | + - name: "Copy lock file" |
| 78 | + run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock |
| 79 | + - name: "Run test script" |
| 80 | + run: ./maintainer-tools/ci/run_task.sh msrv |
| 81 | + |
| 82 | + Format: # 1 jobs, run cargo fmt directly. |
| 83 | + name: Format - stable toolchain |
| 84 | + runs-on: ubuntu-latest |
| 85 | + strategy: |
| 86 | + fail-fast: false |
| 87 | + steps: |
| 88 | + - name: "Checkout repo" |
| 89 | + uses: actions/checkout@v4 |
| 90 | + - name: "Select toolchain" |
| 91 | + uses: dtolnay/rust-toolchain@stable |
| 92 | + - name: "Check formatting" |
| 93 | + run: cargo fmt --all -- --check |
33 | 94 |
|
34 |
| - Integration: |
| 95 | + Integration: # 1 job for each Bitcoin Core version. |
35 | 96 | name: Integration tests - stable toolchain
|
36 | 97 | runs-on: ubuntu-latest
|
37 | 98 | strategy:
|
|
0 commit comments