diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index 8ea19f23c..000000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# rust-miniscript workflow notes - -We are attempting to run max 20 parallel jobs using GitHub actions (usage limit for free tier). - -ref: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration - -The minimal/recent lock files are handled by CI (`rust.yml`). - -## Jobs - -Run from `rust.yml` unless stated otherwise. Total 11 jobs. - -1. `Stable - minimal` -2. `Stable - recent` -3. `Nightly - minimal` -4. `Nightly - recent` -5. `MSRV - minimal` -6. `MSRV - recent` -7. `Lint` -8. `Docs` -9. `Docsrs` -10. `Bench` -11. `Format` -12. `Int-tests` -13. `Embedded` diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 22e302617..994dae283 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,116 +9,43 @@ on: # yamllint disable-line rule:truthy name: Continuous integration jobs: - Stable: # 2 jobs, one per lock file. - name: Test - stable toolchain - runs-on: ubuntu-latest + Stable: + name: Test - ${{ matrix.toolchain }} toolchain, ${{ matrix.dep }} deps + runs-on: ubuntu-26.04 strategy: fail-fast: false matrix: + toolchain: [stable, msrv] dep: [minimal, recent] steps: - - name: "Checkout repo" - uses: actions/checkout@v6 - - uses: ./.github/actions/prepare - with: - toolchain: stable - - name: "Run tests" - run: cargo rbmt test stable --lock-file ${{ matrix.dep }} - - Nightly: # 2 jobs, one per lock file. - name: Test - nightly toolchain - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - dep: [minimal, recent] - steps: - - uses: actions/checkout@v6 - - uses: ./.github/actions/prepare - with: - toolchain: nightly - - name: "Run tests" - run: cargo rbmt test nightly --lock-file ${{ matrix.dep }} - - MSRV: # 2 jobs, one per lock file. - name: Test - 1.63.0 toolchain - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - dep: [minimal, recent] - steps: - - uses: actions/checkout@v6 - - name: "Free disk space" - uses: endersonmenezes/free-disk-space@v3 - with: - remove_android: true - remove_dotnet: true - remove_haskell: true - - uses: ./.github/actions/prepare + # Cleaning up github bloat so that test feature artifacts don't run out of disk. + - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: - toolchain: "1.63.0" + persist-credentials: false + - uses: ./.github/actions/setup-rbmt - name: "Run tests" - run: cargo rbmt test msrv --lock-file ${{ matrix.dep }} + run: cargo rbmt test --toolchain ${{ matrix.toolchain }} --lock-file ${{ matrix.dep }} - Lint: - name: Lint - nightly toolchain - runs-on: ubuntu-latest + Check: + runs-on: ubuntu-26.04 + permissions: + contents: read strategy: fail-fast: false matrix: - dep: [recent] + task: [lint, docs, docsrs, bench] steps: - - uses: actions/checkout@v6 - - uses: ./.github/actions/prepare + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: - toolchain: nightly - components: clippy - - name: "Run lint" - run: cargo rbmt lint - - Docs: - name: Docs - stable toolchain - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - uses: actions/checkout@v6 - - uses: ./.github/actions/prepare - with: - toolchain: stable - - name: "Build docs" - run: cargo rbmt docs - - Docsrs: - name: Docs - nightly toolchain - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - uses: actions/checkout@v6 - - uses: ./.github/actions/prepare - with: - toolchain: nightly - - name: "Build docs.rs docs" - run: cargo rbmt docsrs - - Bench: - name: Bench - nightly toolchain - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - uses: actions/checkout@v6 - - uses: ./.github/actions/prepare - with: - toolchain: nightly - - name: "Run bench" - run: cargo rbmt bench + persist-credentials: false + - uses: ./.github/actions/setup-rbmt + - name: "Run ${{ matrix.task }}" + run: cargo rbmt ${{ matrix.task }} - Format: # 1 job, run cargo fmt directly. + Format: name: Format - nightly toolchain - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 strategy: fail-fast: false steps: @@ -130,9 +57,9 @@ jobs: - name: "Check formatting" run: cargo fmt --all -- --check - Integration: # 1 job for each bitcoind version we support. + Integration: name: Integration tests - stable toolchain - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 strategy: fail-fast: false matrix: @@ -162,7 +89,7 @@ jobs: run: cargo rbmt integration Embedded: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 steps: - name: Checkout uses: actions/checkout@v2