- release-build.yml: new workflow_dispatch-independent job triggered on v* tags, building the lawsynth CLI on a macos-latest/ubuntu-latest matrix (same cargo build --release --locked -p lawsynth-cli command release.yml's verification job already runs) and uploading the packaged binaries as GitHub Release assets via softprops/action-gh-release. Does not modify release.yml, which stays verify-only and workflow_dispatch-triggered. - nightly-science.yml: was running `pytest tests/scientific tests/conformance` directly, which collects zero tests (exit code 5) because those directories hold declarative run.py fixtures, not test_*.py files. Added a Rust toolchain + CLI build step and a new tests/test_scientific.py pytest wrapper (mirroring the existing tests/test_conformance.py pattern) that parametrizes one test per case and runs each case's own run.py via runpy.run_path against the native engine, then pointed the job at the two real wrapper modules. Verified locally: cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test --workspace all clean; actionlint clean on release-build.yml, nightly-science.yml, and (unchanged) release.yml; `pytest tests/test_scientific.py tests/test_conformance.py` passes (22/22) against the compiled CLI. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: Release build
|
|
|
|
# Builds the `lawsynth` CLI binary for macOS and Linux and attaches them to
|
|
# the GitHub Release for the pushed tag. This is additive to, and does not
|
|
# modify, the manual `Release-candidate verification` workflow
|
|
# (release.yml), which stays verify-only and workflow_dispatch-triggered.
|
|
#
|
|
# Does not touch apps/docs-site, packages/world-schema, or
|
|
# packages/world-viewer, so it cannot trigger the Cloudflare Pages deploy of
|
|
# lawsynth.dev (see deploy-site.yml's path filters).
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
CARGO_NET_OFFLINE: "false"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: 1.94.0
|
|
# Same command release.yml's release-candidate verification job runs.
|
|
- run: cargo build --release --locked -p lawsynth-cli
|
|
- name: Package binary
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
mkdir -p dist
|
|
asset="lawsynth-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m)"
|
|
cp target/release/lawsynth "dist/${asset}"
|
|
tar -C dist -czf "dist/${asset}.tar.gz" "${asset}"
|
|
echo "ASSET_PATH=dist/${asset}.tar.gz" >> "$GITHUB_ENV"
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: ${{ env.ASSET_PATH }}
|
|
fail_on_unmatched_files: true
|
|
generate_release_notes: true
|