ci: overhaul CI #1910
Workflow file for this run
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
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| - 'v**-dev' | |
| pull_request: | |
| name: Continuous integration | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: EmbarkStudios/cargo-deny-action@v2 | |
| msrv: | |
| name: MSRV Check (1.89) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/[email protected] | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check workspace compiles on MSRV | |
| run: cargo check --workspace --all-features | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build documentation | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| run: cargo doc --workspace --all-features --no-deps | |
| verify-execution: | |
| name: Verify Test Execution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| cache-dependency-path: .github/scripts/requirements.txt | |
| - run: pip install -r .github/scripts/requirements.txt | |
| - name: Check all crates are assigned to test groups | |
| run: python .github/scripts/ci_config.py verify-groups | |
| test: | |
| name: "test: ${{ matrix.group }} (${{ matrix.os }})" | |
| needs: verify-execution | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-22.04-arm, macos-latest, windows-latest] | |
| group: [core, spv, wallet, rpc, tools] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "rust-cache-${{ matrix.os }}-${{ matrix.group }}" | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| cache-dependency-path: .github/scripts/requirements.txt | |
| - run: pip install -r .github/scripts/requirements.txt | |
| - name: Run tests | |
| run: python .github/scripts/ci_config.py run-group ${{ matrix.group }} --os ${{ matrix.os }} | |
| no-std: | |
| name: No-std Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| cache-dependency-path: .github/scripts/requirements.txt | |
| - run: pip install -r .github/scripts/requirements.txt | |
| - name: Run no-std checks | |
| run: python .github/scripts/ci_config.py run-no-std | |
| integrations_tests: | |
| name: Integration Tests | |
| if: ${{ false }} # Temporarily disabled | |
| runs-on: ubuntu-22.04-arm | |
| strategy: | |
| matrix: | |
| rust: [stable] | |
| dashversion: ["22.1.3"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Running test script | |
| env: | |
| DASHVERSION: ${{ matrix.dashversion }} | |
| run: ./contrib/test-rpc.sh |