feat: mas-lab init onboarding, public examples, and tutorial cleanup … #26
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
| # Copyright (c) 2026 Cisco Systems, Inc. and its affiliates | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Rolling Packages | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: rolling-packages-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-rolling: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - name: runtime | |
| path: runtime | |
| pyproject: runtime/pyproject.toml | |
| - name: library | |
| path: library-standard | |
| pyproject: library-standard/pyproject.toml | |
| - name: ctl | |
| path: ctl | |
| pyproject: ctl/pyproject.toml | |
| - name: core | |
| path: lab/components/core | |
| pyproject: lab/components/core/pyproject.toml | |
| - name: bench | |
| path: lab/components/bench | |
| pyproject: lab/components/bench/pyproject.toml | |
| - name: lab | |
| path: lab | |
| pyproject: lab/pyproject.toml | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Setup Python | |
| run: uv python install 3.12 | |
| - name: Install build tools | |
| run: uv tool install build | |
| - name: Compute rolling version | |
| id: rolling | |
| run: | | |
| BASE=$(python3 scripts/version_manager.py get ${{ matrix.name }}) | |
| SHORT_SHA=$(git rev-parse --short=7 HEAD) | |
| ROLLING="${BASE}+g${SHORT_SHA}" | |
| echo "base=${BASE}" >> "$GITHUB_OUTPUT" | |
| echo "sha=${SHORT_SHA}" >> "$GITHUB_OUTPUT" | |
| echo "rolling=${ROLLING}" >> "$GITHUB_OUTPUT" | |
| echo "Rolling version: ${ROLLING}" | |
| - name: Patch package version for rolling build | |
| run: | | |
| python3 - <<'PY' | |
| from pathlib import Path | |
| import re | |
| path = Path("${{ matrix.pyproject }}") | |
| content = path.read_text() | |
| rolling = "${{ steps.rolling.outputs.rolling }}" | |
| updated = re.sub(r'version\s*=\s*"[^"]+"', f'version = "{rolling}"', content, count=1) | |
| path.write_text(updated) | |
| print(f"Patched {path} -> {rolling}") | |
| PY | |
| - name: Build rolling package | |
| run: pyproject-build ${{ matrix.path }} | |
| - name: Upload rolling artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rolling-${{ matrix.name }}-${{ steps.rolling.outputs.sha }} | |
| path: ${{ matrix.path }}/dist/* | |
| retention-days: 14 |