Skip to content

Whole-repo review: delete duplicated rules and dispatches #220

Whole-repo review: delete duplicated rules and dispatches

Whole-repo review: delete duplicated rules and dispatches #220

Workflow file for this run

# CI for every pull request and for pushes to main.
#
# Actions are pinned to commit hashes, not tags, following Bitcoin
# Core practice. Update the hash and the trailing version comment
# together. CI never fetches reference material from the network:
# oracles are the pinned wheels, upstream vectors are vendored data.
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
defaults:
run:
shell: bash
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Install pinned lint tools
run: |
python3 -m venv "${RUNNER_TEMP}/lint-venv"
"${RUNNER_TEMP}/lint-venv/bin/pip" install --quiet -r ci/lint/requirements.txt
- name: Run lints
run: PATH="${RUNNER_TEMP}/lint-venv/bin:${PATH}" ci/lint/lint.sh
test:
name: Tests and vector corpus
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Install package with dev and oracle pins
run: |
python3 -m venv "${RUNNER_TEMP}/venv"
"${RUNNER_TEMP}/venv/bin/pip" install --quiet -e ".[dev,oracles]"
- name: Unit and invariant suites
run: |
"${RUNNER_TEMP}/venv/bin/pytest" python/tests
- name: Vector corpus
run: |
"${RUNNER_TEMP}/venv/bin/python" tools/run_vectors.py
- name: Upstream corpus
# Chia's official CLVM command tests, vendored in
# vectors/upstream/clvm/. Also exercised by the unit suite,
# kept standalone so the bucket summary lands in the log.
run: |
"${RUNNER_TEMP}/venv/bin/python" tools/run_upstream.py
- name: Differential harness, 10k programs
# The Phase 1 done-criterion gate. The seed varies per run so
# regressions cannot hide behind one fixed slice, and it is
# printed so any failure reproduces locally with
# tools/diff_clvm.py --count 10000 --seed <printed seed>.
env:
DIFF_SEED: ${{ github.run_id }}
run: |
echo "diff harness seed: ${DIFF_SEED}"
"${RUNNER_TEMP}/venv/bin/python" tools/diff_clvm.py \
--count 10000 --seed "${DIFF_SEED}"
- name: secp_verify differential, Core oracle plus libsecp256k1
# secp_verify has no CLVM oracle: the differential runs
# against Core's vendored test-framework implementation, and
# the system libsecp256k1 joins as a required third verifier
# (Ubuntu's package enables the schnorrsig module).
# Reproduce locally with
# tools/diff_secp.py --count 40 --seed <printed seed>.
env:
DIFF_SEED: ${{ github.run_id }}
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq libsecp256k1-dev
echo "diff_secp seed: ${DIFF_SEED}"
"${RUNNER_TEMP}/venv/bin/python" tools/diff_secp.py \
--count 40 --seed "${DIFF_SEED}" --require-libsecp
- name: sha256tree differential, flag-gated oracle
# sha256tree sits outside the flags-0 intersection (divergence
# D9): the differential runs against the pinned wheel's
# flag-enabled operator, its tree_hash utility, and an
# in-language tree-hash program on both oracles at flags 0.
# Reproduce locally with
# tools/diff_sha256tree.py --count 400 --seed <printed seed>.
env:
DIFF_SEED: ${{ github.run_id }}
run: |
echo "diff_sha256tree seed: ${DIFF_SEED}"
"${RUNNER_TEMP}/venv/bin/python" tools/diff_sha256tree.py \
--count 400 --seed "${DIFF_SEED}"