Skip to content

Bootstrap the runtime-factory skeleton (TODO.python/02) #3

Bootstrap the runtime-factory skeleton (TODO.python/02)

Bootstrap the runtime-factory skeleton (TODO.python/02) #3

Workflow file for this run

# Copyright (c) 2026 [Ribose Inc](https://www.ribose.com).
# All rights reserved.
# This file is a part of tamatebako
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# The skeleton lint gate (TODO.python/02 bootstrap): everything that can
# be proven WITHOUT real builds — contract.yml against its schema, the
# version catalog resolvable, the leg matrix computable, every authored
# YAML/JSON parseable. The build legs' own gates (boot smoke, contract
# parity) land with the real build logic.
name: lint
on:
push:
branches: [main]
pull_request:
# One run per branch/PR-head at a time: pushing to a branch with an open
# PR would otherwise run every job twice (push + pull_request events);
# a new run cancels the stale one.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
lint:
name: contract + catalog + matrix + parse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: "3.3"
bundler-cache: true
- name: validate contract.yml against its schema
run: bundle exec scripts/check_contract.rb
# The catalog resolves under the full dispatch grammar (the same
# read the publish.yml plan job performs). Stdlib-only scripts —
# no bundle exec needed, no gem surface.
- name: resolve the version catalog
run: |
scripts/versions
scripts/versions --filter full
scripts/versions --filter tidy
scripts/versions --filter "3.12.14,3.13.15"
scripts/versions --pin link_unit_release
# The publish.yml plan job's input: the filtered cross product must
# be computable and non-empty (an unguarded empty matrix poisons a
# run conclusion — the python source factory's v0.2.24-lesson note
# in its release-src.yml).
- name: compute the leg matrix
run: |
scripts/compute_matrix.rb | ruby -rjson -e '
m = JSON.parse(STDIN.read)
abort "::error::empty leg matrix" if m["include"].empty?
puts "#{m["include"].length} legs"
'
- name: parse every authored YAML/JSON
run: |
ruby -ryaml -rjson -e '
(Dir[".github/workflows/*.{yml,yaml}"] + %w[contract.yml schema/contract.schema.yml]).each do |f|
YAML.load_file(f)
puts "parsed #{f}"
end
JSON.parse(File.read(".github/matrix.json"))
puts "parsed .github/matrix.json"
'