sdk%fix(zen): follow up base-sdk#32, base-sdk#33 (#34) #153
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
| name: MSRV (1.85) | |
| on: | |
| push: | |
| branches: [develop] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 100 | |
| - name: Run pull request checks | |
| if: github.event_name == 'pull_request' | |
| shell: bash | |
| run: | | |
| source .github/ci.env | |
| commits=${{ github.event.pull_request.commits }} | |
| if [ "${commits}" -gt "${MAX_PR_COMMITS}" ]; then | |
| echo "::error::PR has ${commits} commits (limit: ${MAX_PR_COMMITS})" | |
| exit 1 | |
| fi | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.85.0 | |
| with: | |
| components: rustfmt | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| - name: Set up Python | |
| id: python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v10.0.1 | |
| with: | |
| version: 0.12.9 | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| - name: Install Python dependencies | |
| run: | | |
| uv sync --locked --extra dev --python '${{ steps.python.outputs.python-path }}' | |
| echo "${PWD}/.venv/bin" >> "${GITHUB_PATH}" | |
| - name: Install CodeQL | |
| id: setup-codeql | |
| uses: github/codeql-action/setup-codeql@v4.37.1 | |
| with: | |
| tools: linked | |
| - name: Setup CodeQL | |
| run: echo "$(dirname '${{ steps.setup-codeql.outputs.codeql-path }}')" >> "$GITHUB_PATH" | |
| - name: Restore cargo registry | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: cargo-deps-${{ hashFiles('Cargo.lock', 'docs/samples/Cargo.lock') }} | |
| restore-keys: cargo-deps- | |
| - name: Restore build artifacts | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: target | |
| key: cargo-build-msrv-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }} | |
| restore-keys: | | |
| cargo-build-msrv-${{ runner.os }}-${{ runner.arch }}- | |
| - name: Manage CodeQL packs | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.codeql | |
| key: codeql-packs-${{ hashFiles('maint/codeql/*/codeql-pack.lock.yml') }} | |
| - name: Run linters | |
| run: | | |
| python3 maint/lint_all.py --exclude lint_codeql | |
| python3 maint/lint/lint_codeql.py check | |
| env: | |
| RUSTUP_TOOLCHAIN: 1.85.0 | |
| - name: Run CodeQL | |
| run: python3 maint/lint/lint_codeql.py run --lang=rust --with-suite=rust-security-and-quality | |
| env: | |
| RUSTUP_TOOLCHAIN: 1.85.0 | |
| - name: Check PR commit messages | |
| if: github.event_name == 'pull_request' | |
| run: > | |
| python3 maint/lint/lint_unconv.py | |
| -r "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}" | |
| build: | |
| name: Build and test | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Run pull request checks | |
| if: github.event_name == 'pull_request' | |
| shell: bash | |
| run: | | |
| source .github/ci.env | |
| commits=${{ github.event.pull_request.commits }} | |
| if [ "${commits}" -gt "${MAX_PR_COMMITS}" ]; then | |
| echo "::error::PR has ${commits} commits (limit: ${MAX_PR_COMMITS})" | |
| exit 1 | |
| fi | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.85.0 | |
| - name: Restore cargo registry | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: cargo-deps-${{ hashFiles('Cargo.lock', 'docs/samples/Cargo.lock') }} | |
| restore-keys: cargo-deps- | |
| - name: Manage build artifacts | |
| uses: actions/cache@v5 | |
| with: | |
| path: target | |
| key: cargo-build-msrv-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }} | |
| restore-keys: | | |
| cargo-build-msrv-${{ runner.os }}-${{ runner.arch }}- | |
| - name: Build workspace | |
| run: | | |
| cargo build --workspace --exclude dash-pow --features full | |
| cargo build -p dash-pow --features std,aes_hw | |
| env: | |
| RUSTUP_TOOLCHAIN: 1.85.0 | |
| - name: Test workspace | |
| run: | | |
| cargo test --workspace --exclude dash-pow --features full | |
| cargo test -p dash-pow --features std,aes_hw | |
| env: | |
| RUSTUP_TOOLCHAIN: 1.85.0 |