mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-05 23:01:17 +00:00
Check profiles: leave engine PRs' slice sweep to Build all
The slice sweep here runs the nightly validator, built from main, so it cannot expand custom G-code that uses a setting the PR adds to the engine and reports it as an undefined placeholder. The belt printer PR fails on exactly that: the BabyBelt Pro start G-code passes [belt_slice_rotation_angle] to its firmware, and main has no such setting. A PR that changes src/ also runs Build all, whose Slice check runs the same sweep with the validator built from the PR (it passes on that PR). So the sweep here now runs only for PRs that leave src/ alone, which are the profile-only PRs it exists for and the ones pr-merge-bot gates on. If the base commit cannot be fetched, the sweep runs as before.
This commit is contained in:
@@ -74,12 +74,26 @@ jobs:
|
||||
set +e
|
||||
./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -l 2 2>&1 | tee ${{ runner.temp }}/validate_system.log
|
||||
exit ${PIPESTATUS[0]}
|
||||
# The validator above is the nightly build of main, so it cannot slice profiles that use
|
||||
# settings a PR adds to the engine: it reports their placeholders as undefined. A PR that
|
||||
# changes src/ also runs Build all, whose Slice check runs this same sweep with the
|
||||
# validator built from the PR, so the sweep below only runs for the other PRs.
|
||||
- name: Detect engine changes
|
||||
id: engine_changes
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: |
|
||||
base=${{ github.event.pull_request.base.sha }}
|
||||
if git fetch --no-tags --depth=1 origin "$base" && ! git diff --quiet "$base" HEAD -- src/; then
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice::This PR changes src/, so Build all's Slice check slices the profiles with the PR-built validator."
|
||||
fi
|
||||
# Slice a two-colour cube through every printer, and through every system process/filament whose
|
||||
# templates no printer's own slice reaches, so every custom g-code and filename_format shipped is
|
||||
# expanded (names in {if} branches not taken included) - catches undefined-placeholder /
|
||||
# invalid-flow bugs the static checks above cannot see.
|
||||
- name: validate slice (expand custom g-code)
|
||||
id: validate_slice
|
||||
if: ${{ steps.engine_changes.outputs.changed != 'true' }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set +e
|
||||
|
||||
Reference in New Issue
Block a user