Revise M53 shared-core adoption review plan #390
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: ci | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable (pinned 2026-04-01) | |
| with: | |
| toolchain: 1.89.0 | |
| components: rustfmt, clippy | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| - name: Format check | |
| run: cargo fmt --all --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: Test | |
| run: cargo test --workspace | |
| - name: Check ecommerce example | |
| run: | | |
| cargo run -p spec-cli -- generate examples/ecommerce/units --output examples/ecommerce/src/generated | |
| cargo check --manifest-path examples/ecommerce/Cargo.toml | |
| monotone_up_pilot: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable (pinned 2026-04-01) | |
| with: | |
| toolchain: 1.89.0 | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| - name: Monotone-up pilot | |
| run: | | |
| cargo test -p spec-core --lib monotone_up_classifier_ -- --color never | |
| cargo test -p spec-core --lib monotone_up_regression_ -- --color never | |
| cargo test -p spec-cli --test m14_regressions monotone_up_truth_surface_ -- --color never | |
| cargo test -p spec-cli --test m14_regressions monotone_up_corpus_ -- --color never | |
| cargo test -p spec-cli --test m14_regressions monotone_up_regression_ -- --color never | |
| cargo xtask family prove function.arithmetic_leaf.monotone_up.v1 | |
| cargo xtask family prove function.arithmetic_leaf.monotone_up.v1 --target-language typescript | |
| cargo xtask family certify function.arithmetic_leaf.monotone_up.v1 | |
| cargo xtask family certify function.arithmetic_leaf.monotone_up.v1 --target-language typescript | |
| wrapper_pipeline_pilot: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable (pinned 2026-04-01) | |
| with: | |
| toolchain: 1.89.0 | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| - name: Wrapper pipeline pilot | |
| run: | | |
| cargo test -p spec-core --lib wrapper_pipeline_ -- --color never | |
| cargo test -p spec-cli --test cli wrapper_pipeline_truth_surface_ -- --color never | |
| cargo test -p spec-cli --test m14_regressions wrapper_pipeline_corpus_ -- --color never | |
| cargo test -p spec-cli --test m14_regressions wrapper_pipeline_regression_ -- --color never | |
| cargo xtask family prove function.wrapper.pipeline.v1 | |
| cargo xtask family prove function.wrapper.pipeline.v1 --target-language typescript | |
| cargo xtask family certify function.wrapper.pipeline.v1 | |
| cargo xtask family certify function.wrapper.pipeline.v1 --target-language typescript | |
| publish: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [test, monotone_up_pilot, wrapper_pipeline_pilot] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable (pinned 2026-04-01) | |
| with: | |
| toolchain: 1.89.0 | |
| - name: Publish spec-core | |
| run: | | |
| out=$(cargo publish -p spec-core 2>&1); status=$? | |
| echo "$out" | |
| if [ $status -ne 0 ] && echo "$out" | grep -q "already exists"; then | |
| echo "spec-core already published, skipping." | |
| elif [ $status -ne 0 ]; then | |
| exit $status | |
| fi | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Wait for crates.io indexing | |
| run: sleep 60 | |
| - name: Publish spec-cli | |
| run: | | |
| out=$(cargo publish -p spec-cli 2>&1); status=$? | |
| echo "$out" | |
| if [ $status -ne 0 ] && echo "$out" | grep -q "already exists"; then | |
| echo "spec-cli already published, skipping." | |
| elif [ $status -ne 0 ]; then | |
| exit $status | |
| fi | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| create_release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [test, monotone_up_pilot, wrapper_pipeline_pilot] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Create GitHub Release (if missing) | |
| run: | | |
| if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then | |
| echo "Release $GITHUB_REF_NAME already exists." | |
| else | |
| gh release create "$GITHUB_REF_NAME" --generate-notes | |
| fi | |
| release_build: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: create_release | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-musl | |
| use_cross: true | |
| - os: ubuntu-latest | |
| target: aarch64-unknown-linux-musl | |
| use_cross: true | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| use_cross: false | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| use_cross: false | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TARGET: ${{ matrix.target }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable (pinned 2026-04-01) | |
| with: | |
| toolchain: 1.89.0 | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| - name: Install cross (Linux only) | |
| if: matrix.use_cross | |
| run: cargo install cross --locked --version 0.2.5 | |
| - name: Build | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if [[ "${{ matrix.use_cross }}" == "true" ]]; then | |
| cross build -p spec-cli --bin spec --release --locked --target "$TARGET" | |
| else | |
| rustup target add "$TARGET" | |
| cargo build -p spec-cli --bin spec --release --locked --target "$TARGET" | |
| fi | |
| - name: Package + checksums | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| ASSET="spec-${VERSION}-${TARGET}.tar.gz" | |
| CHECKSUM="${ASSET}.sha256" | |
| tar -C "target/${TARGET}/release" -czf "${ASSET}" spec | |
| if command -v sha256sum >/dev/null 2>&1; then | |
| sha256sum "${ASSET}" > "${CHECKSUM}" | |
| else | |
| shasum -a 256 "${ASSET}" > "${CHECKSUM}" | |
| fi | |
| gh release upload "$GITHUB_REF_NAME" "${ASSET}" "${CHECKSUM}" --clobber |