Merge branch 'main' into feat-auto-updater

This commit is contained in:
Lam Wei Lun committed 2026-11-22 11:50:18 +08:00
commit b3272d06ac
244 files changed
+18207 -1875

No files matched your search

+2
View File
@@ -291,7 +291,9 @@ jobs:
path: test-results
# Best-effort: a read-only token (e.g. fork PRs) can't write the check, so
# don't let a publish failure fail the run. The test jobs gate correctness.
# Skipped when every build failed: there is nothing to publish.
- name: Publish Test Results
if: ${{ hashFiles('test-results/**/*.xml') != '' }}
continue-on-error: true
uses: EnricoMi/publish-unit-test-result-action@v2
with:
+17 -7
View File
@@ -17,12 +17,14 @@
# listed instead. The macOS and the cl.exe builds never start on their own:
# what breaks only cl comes from source changes, which no path rule can see.
#
# Each label added starts a run of its own, and the pull request's checks show
# the newest run only, so every run builds everything the labels and the
# changed files ask for. Each build keeps its own concurrency group: the newest
# run's build cancels the one an earlier run of the commit started, and a push
# cancels the builds of the commit it replaces. cancel_closed_pr_builds.yml
# joins the groups by name, so update that file with any change here.
# Each build-* or macos-priority label added starts a run of its own, and the
# pull request's checks show the newest run only, so every run builds
# everything the labels and the changed files ask for; any other label builds
# nothing. Each build keeps its own concurrency group: a build entering its
# group cancels the one already in it, so when two runs start together the
# last to enter wins, not necessarily the newest run. A push cancels the
# builds of the commit it replaces. cancel_closed_pr_builds.yml joins the
# groups by name, so update that file with any change here.
name: Optional builds
on:
@@ -60,6 +62,9 @@ on:
jobs:
select:
name: Select builds
# A label that asks for no build must not restart the builds in progress.
# macos-priority restarts them, to move the macOS build to its own line.
if: ${{ github.event.action != 'labeled' || startsWith(github.event.label.name, 'build-') || github.event.label.name == 'macos-priority' }}
runs-on: ubuntu-24.04
outputs:
flatpak: ${{ steps.select.outputs.flatpak }}
@@ -186,7 +191,9 @@ jobs:
publish_test_results:
name: Publish Test Results
needs: [flatpak, unit_tests_windows_arm64]
if: ${{ !cancelled() && (needs.flatpak.result != 'skipped' || needs.unit_tests_windows_arm64.result != 'skipped') }}
# Concurrency cancels the builds of a superseded run, not the run, so
# !cancelled() alone would still publish for it.
if: ${{ !cancelled() && (contains(fromJSON('["success", "failure"]'), needs.flatpak.result) || contains(fromJSON('["success", "failure"]'), needs.unit_tests_windows_arm64.result)) }}
runs-on: ubuntu-latest
steps:
- name: Download Test Results
@@ -196,7 +203,10 @@ jobs:
path: test-results
# Best-effort, as in build_all.yml: a read-only token (e.g. fork PRs)
# can't write the check. The test jobs gate correctness.
# A build that failed runs no tests; publishing nothing would post an
# empty result.
- name: Publish Test Results
if: ${{ hashFiles('test-results/**/*.xml') != '' }}
continue-on-error: true
uses: EnricoMi/publish-unit-test-result-action@v2
with:
+35 -7
View File
@@ -10,35 +10,42 @@ permissions:
issues: write
pull-requests: write
# Overlapping runs would overwrite each other's saved progress.
concurrency:
group: stale
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v11
with:
# Each new stale label costs about 2 operations. Runs that stop early
# continue from the same place the next day.
operations-per-run: 300
# Each stale label or close costs about 2 operations and posts one
# comment, so 800 stays under GitHub's limit of 500 comments an hour.
# Runs that stop early continue from the same place the next day.
operations-per-run: 800
ascending: true
stale-issue-label: stale
stale-pr-label: stale
remove-stale-when-updated: true
# The last step mirrors the exempt and only-labels options below.
# Update its filters when they change.
# Issues
days-before-issue-stale: 90
days-before-issue-close: 14
close-issue-reason: not_planned
exempt-issue-labels: enhancement
exempt-all-issue-assignees: true
exempt-all-issue-milestones: true
stale-issue-message: |
This issue has had no activity for 90 days, so it will be closed in 14 days.
If it still happens on the latest OrcaSlicer release, please leave a comment with the version you tested and it will stay open.
If it's a bug that still happens on the latest OrcaSlicer release, please leave a comment with the version you tested. If it's a feature request you still want, please leave a comment saying so. Either one keeps it open.
close-issue-message: |
This issue was closed because there was no activity after the reminder.
If it still happens on the latest release, leave a comment here and a team member can reopen it, or open a new issue with the details.
If it still matters to you, leave a comment here and a team member can reopen it, or open a new issue with the details.
# PRs: only PRs where we asked the author for something
only-pr-labels: "wait for response"
@@ -51,8 +58,29 @@ jobs:
stale-pr-message: |
We asked for changes or more information on this PR, and there has been no activity for 90 days. It will be closed in 14 days.
To keep it open, leave a comment. If you push new commits, please also leave a short comment, because a push alone does not reset this. If you no longer have time for it, that is fine, just let us know.
To keep it open, leave a comment. If you push new commits, please also leave a short comment so we know it's ready for another look. If you no longer have time for it, that is fine, just let us know.
close-pr-message: |
This PR was closed because we did not hear back after the reminder. Thank you for the work you put into it.
If you want to continue, push your changes and reopen it, or open a new PR.
# The stale bot checks exemptions before activity, so it never comes back
# to a stale item that became exempt. Remove the label from those here.
- name: Remove stale labels the stale bot will not revisit
if: ${{ !cancelled() }}
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
{
gh issue list -R "$GITHUB_REPOSITORY" --label stale --state open --limit 5000 \
--json number,assignees,milestone \
--jq '.[] | select((.assignees | length > 0) or .milestone != null) | .number'
gh pr list -R "$GITHUB_REPOSITORY" --label stale --state open --limit 1000 \
--json number,isDraft,assignees,milestone,labels \
--jq '.[] | select(.isDraft or (.assignees | length > 0) or .milestone != null
or ([.labels[].name] | index("wait for response") | not)) | .number'
} | while read -r n; do
gh api -X DELETE "repos/$GITHUB_REPOSITORY/issues/$n/labels/stale" --silent < /dev/null ||
echo "::warning::Could not remove the stale label from #$n"
done
+36
View File
@@ -0,0 +1,36 @@
name: Remove stale label on comment
# stale.yml only removes the label when its daily run gets back to an item,
# which can take a few days. This removes it as soon as someone comments.
on:
issue_comment:
types: [created]
permissions:
issues: write
pull-requests: write
jobs:
unstale:
if: >-
github.repository == 'OrcaSlicer/OrcaSlicer' &&
github.event.issue.state == 'open' &&
github.event.comment.user.type == 'User' &&
contains(github.event.issue.labels.*.name, 'stale')
runs-on: ubuntu-latest
steps:
- name: Remove the stale label
env:
GH_TOKEN: ${{ github.token }}
NUMBER: ${{ github.event.issue.number }}
run: |
# "Close with comment" sends the event while the issue is still open.
state=$(gh api "repos/$GITHUB_REPOSITORY/issues/$NUMBER" --jq .state)
if [ "$state" != open ]; then
exit 0
fi
# A 404 means another comment or the stale run already removed it.
if ! gh api -X DELETE "repos/$GITHUB_REPOSITORY/issues/$NUMBER/labels/stale" --silent 2> err.txt; then
cat err.txt >&2
grep -q "HTTP 404" err.txt
fi