mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
Compare commits
10 Commits
nightly-bu
...
hanif/pari
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a219b414a | ||
|
|
d888cc5702 | ||
|
|
454967ebd7 | ||
|
|
3744b14ab8 | ||
|
|
76b6d94d5c | ||
|
|
8df242ab30 | ||
|
|
ecb0f22935 | ||
|
|
55b44d22cc | ||
|
|
7347663e89 | ||
|
|
7da1a188ac |
145
.github/workflows/cli_overrides.yml
vendored
Normal file
145
.github/workflows/cli_overrides.yml
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
# CLI override sweep (orca-test-repo test_cli_overrides.py) against the
|
||||
# latest successful Linux AppImage build of this repo. Verifies every CLI
|
||||
# config option lands in the merged config and the sliced G-code's
|
||||
# CONFIG_BLOCK, then re-slices each landed option individually to classify
|
||||
# it effective/inert (--effect-full). Headless CLI only - no display stack.
|
||||
name: CLI Override Sweep
|
||||
|
||||
on:
|
||||
# temporary, for pre-merge branch testing: workflow_dispatch only works once
|
||||
# the workflow exists on the default branch, but push events run the
|
||||
# workflow from the pushed ref. Remove this trigger when merging to main.
|
||||
push:
|
||||
branches: ["hanif/parity-harness"]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
test_repo_ref:
|
||||
description: "orca-test-repo ref to run"
|
||||
required: false
|
||||
default: "cli-test-suite"
|
||||
build_branch:
|
||||
description: "branch whose latest successful build_all artifact to test"
|
||||
required: false
|
||||
default: "main"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
overrides:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# The effect stage re-slices every landed option one at a time and
|
||||
# cannot batch, so it is the whole cost of this job.
|
||||
# parity/effect_routing.json groups options by the cheapest fixture that
|
||||
# can show their effect and splits them into balanced, disjoint shards
|
||||
# covering every landed option exactly once. Measured at ~12.5 min a
|
||||
# shard; un-sharded the sweep is ~24 min, so this is about feedback time
|
||||
# rather than fitting the timeout.
|
||||
shard: [0, 1]
|
||||
steps:
|
||||
- name: Find the latest successful Linux build
|
||||
id: build
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gh run list --workflow build_all.yml \
|
||||
--branch "${{ github.event.inputs.build_branch || 'main' }}" \
|
||||
--status success --limit 1 --json databaseId,headSha \
|
||||
--jq '"run_id=\(.[0].databaseId)\nhead_sha=\(.[0].headSha)"' \
|
||||
>> "$GITHUB_OUTPUT"
|
||||
cat "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check out the test suite
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
repository: OrcaSlicer/orca-test-repo
|
||||
# temporary fallback for push-triggered branch testing (inputs are
|
||||
# empty on push): restore to 'cli-test-suite' when merging to main
|
||||
ref: ${{ github.event.inputs.test_repo_ref || 'hanif/parity-harness' }}
|
||||
path: orca-test-repo
|
||||
|
||||
# the AppImage ships only packed .opc preset caches, no profile JSONs,
|
||||
# so resources/ (and the option-surface source) must come from the
|
||||
# source tree at the SAME sha the artifact was built from
|
||||
- name: Check out OrcaSlicer sources at the build's sha
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
ref: ${{ steps.build.outputs.head_sha }}
|
||||
path: slicer
|
||||
|
||||
- name: Download and extract the Linux AppImage
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gh run download "${{ steps.build.outputs.run_id }}" --dir appimage \
|
||||
--pattern "OrcaSlicer_Linux_ubuntu_2404*"
|
||||
appimage=$(find appimage -name "*.AppImage" ! -name "*aarch64*" | head -1)
|
||||
[ -n "$appimage" ] || { echo "no AppImage found"; ls -R appimage; exit 1; }
|
||||
chmod +x "$appimage"
|
||||
"$appimage" --appimage-extract > /dev/null
|
||||
[ -x squashfs-root/AppRun ] || { echo "no AppRun in AppImage"; exit 1; }
|
||||
echo "ORCA_BIN=$PWD/squashfs-root/AppRun" >> "$GITHUB_ENV"
|
||||
echo "ORCA_SOURCE=$PWD/slicer" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Install the AppImage's host runtime dependencies
|
||||
run: |
|
||||
# orca-slicer-env's two preflight gates: OpenGL and WebKitGTK 4.1
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libopengl0 libglu1-mesa libgl1 libegl1 libwebkit2gtk-4.1-0
|
||||
|
||||
- name: Install suite dependencies
|
||||
run: pip install -r orca-test-repo/requirements.txt
|
||||
|
||||
- name: Run the override sweep (full effect stage)
|
||||
id: run
|
||||
continue-on-error: true
|
||||
working-directory: orca-test-repo
|
||||
run: |
|
||||
# -rA prints the per-stage summaries: pytest captures stdout on
|
||||
# passing tests, so without it every "grep override sweep" below
|
||||
# finds nothing and the job summary says "no stage summaries"
|
||||
python -m pytest test_cli_overrides.py -c pytest.ini -v -rA --effect-full \
|
||||
--effect-shard ${{ matrix.shard }}/2 \
|
||||
--orca-bin "$ORCA_BIN" --orca-source "$ORCA_SOURCE" \
|
||||
2>&1 | tee ../sweep.log
|
||||
|
||||
- name: Publish job summary
|
||||
if: always()
|
||||
run: |
|
||||
{
|
||||
echo "## CLI override sweep - shard ${{ matrix.shard }}/2"
|
||||
grep -E "\[override sweep" sweep.log || echo "no stage summaries (see log)"
|
||||
echo
|
||||
grep -E "^(=+ )?[0-9]+ (passed|failed)" sweep.log | tail -1 || true
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Upload the override report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: override-report-${{ github.run_id }}-shard${{ matrix.shard }}
|
||||
path: |
|
||||
orca-test-repo/.pytest_cache/override_report.json
|
||||
sweep.log
|
||||
if-no-files-found: warn
|
||||
retention-days: 30
|
||||
|
||||
# The sweep step is continue-on-error so the summary and artifact steps
|
||||
# above still run on a failure - without this the job would then report
|
||||
# success, and a shard that measured nothing would look identical to a
|
||||
# healthy one.
|
||||
- name: Fail the job if the sweep failed
|
||||
if: steps.run.outcome == 'failure'
|
||||
run: |
|
||||
echo "the override sweep failed - see the job summary and the uploaded report" >&2
|
||||
exit 1
|
||||
144
.github/workflows/parity.yml
vendored
Normal file
144
.github/workflows/parity.yml
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
# GUI-vs-CLI parity check. Runs the parity harness from
|
||||
# OrcaSlicer/orca-test-repo (parity/) against the latest successful Linux
|
||||
# AppImage build of this repo. Metrics-only: the job never gates - its
|
||||
# product is scorecard.json / report.md, with the count of NEW divergences
|
||||
# (differences not in the harness's known-differences ledger) as the
|
||||
# headline number in the job summary.
|
||||
name: GUI-CLI Parity
|
||||
|
||||
on:
|
||||
# temporary, for pre-merge branch testing: workflow_dispatch only works once
|
||||
# the workflow exists on the default branch, but push events run the
|
||||
# workflow from the pushed ref. Remove this trigger when merging to main.
|
||||
push:
|
||||
branches: ["hanif/parity-harness"]
|
||||
schedule:
|
||||
- cron: "30 18 * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
fixtures:
|
||||
description: "space-separated fixture ids (empty = all)"
|
||||
required: false
|
||||
default: ""
|
||||
test_repo_ref:
|
||||
description: "orca-test-repo ref to run"
|
||||
required: false
|
||||
default: "cli-test-suite"
|
||||
build_branch:
|
||||
description: "branch whose latest successful build_all artifact to slice with"
|
||||
required: false
|
||||
default: "main"
|
||||
cli_presets:
|
||||
description: "lane C preset handling: flat = flatten inherits (clean parity), raw = leaf as-is (measures the CLI's unresolved-inherits behavior, expect large divergence on unfixed builds)"
|
||||
required: false
|
||||
default: "flat"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
parity:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- name: Find the latest successful Linux build
|
||||
id: build
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gh run list --workflow build_all.yml \
|
||||
--branch "${{ github.event.inputs.build_branch || 'main' }}" \
|
||||
--status success --limit 1 --json databaseId,headSha \
|
||||
--jq '"run_id=\(.[0].databaseId)\nhead_sha=\(.[0].headSha)"' \
|
||||
>> "$GITHUB_OUTPUT"
|
||||
cat "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check out the parity test suite
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
repository: OrcaSlicer/orca-test-repo
|
||||
# temporary fallback for push-triggered branch testing (inputs are
|
||||
# empty on push): restore to 'cli-test-suite' when merging to main
|
||||
ref: ${{ github.event.inputs.test_repo_ref || 'hanif/parity-harness' }}
|
||||
path: orca-test-repo
|
||||
|
||||
# the AppImage ships only packed .opc preset caches, no profile JSONs,
|
||||
# so resources/profiles must come from the source tree at the SAME sha
|
||||
# the artifact was built from
|
||||
- name: Check out OrcaSlicer sources at the build's sha
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
ref: ${{ steps.build.outputs.head_sha }}
|
||||
path: slicer
|
||||
|
||||
- name: Download and extract the Linux AppImage
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gh run download "${{ steps.build.outputs.run_id }}" --dir appimage \
|
||||
--pattern "OrcaSlicer_Linux_ubuntu_2404*"
|
||||
# prefer the x86_64 artifact (amd64 is historically unsuffixed)
|
||||
appimage=$(find appimage -name "*.AppImage" ! -name "*aarch64*" | head -1)
|
||||
[ -n "$appimage" ] || { echo "no AppImage found"; ls -R appimage; exit 1; }
|
||||
chmod +x "$appimage"
|
||||
"$appimage" --appimage-extract > /dev/null
|
||||
# the bare binary misses bundled libs (libavcodec etc.) - use AppRun,
|
||||
# which sets up the AppImage's library paths and forwards arguments
|
||||
[ -x squashfs-root/AppRun ] || { echo "no AppRun in AppImage"; exit 1; }
|
||||
echo "ORCA_BIN=$PWD/squashfs-root/AppRun" >> "$GITHUB_ENV"
|
||||
echo "ORCA_SLICER_ROOT=$PWD/slicer" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Install display tooling for the GUI lanes
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# the AppImage's orca-slicer-env preflight requires host OpenGL and
|
||||
# WebKitGTK 4.1 runtimes; everything else ships in the AppImage
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
xvfb xdotool imagemagick openbox mesa-utils \
|
||||
libopengl0 libglu1-mesa libgl1 libegl1 libwebkit2gtk-4.1-0
|
||||
|
||||
- name: Run the parity harness
|
||||
id: run
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set -euo pipefail
|
||||
fixtures=""
|
||||
for f in ${{ github.event.inputs.fixtures || '' }}; do
|
||||
fixtures="$fixtures --fixture $f"
|
||||
done
|
||||
# 2 concurrent GUI displays: measured ~1.5 cores peak / ~1.9 GB on
|
||||
# this 4-vCPU / 16 GB runner (3+ would contend); each fixture is
|
||||
# fully isolated so this is correctness-neutral
|
||||
python3 orca-test-repo/parity/run_parity.py \
|
||||
--slicer-root "$ORCA_SLICER_ROOT" --bin "$ORCA_BIN" \
|
||||
--cli-presets "${{ github.event.inputs.cli_presets || 'flat' }}" \
|
||||
--gui-workers 2 \
|
||||
--out "$PWD/parity-out" $fixtures
|
||||
|
||||
- name: Publish job summary
|
||||
if: always()
|
||||
run: |
|
||||
if [ -f parity-out/report.md ]; then
|
||||
cat parity-out/report.md >> "$GITHUB_STEP_SUMMARY"
|
||||
else
|
||||
echo "harness produced no report (see logs)" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
- name: Prune bulky per-lane state before upload
|
||||
if: always()
|
||||
run: |
|
||||
rm -rf parity-out/*/seed parity-out/*/datadir-* || true
|
||||
|
||||
- name: Upload scorecard and evidence
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: parity-scorecard-${{ github.run_id }}
|
||||
path: parity-out/
|
||||
if-no-files-found: warn
|
||||
retention-days: 30
|
||||
Reference in New Issue
Block a user