Feature/cicd selfhost2#12840
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions CI workflows to better support self-hosted runners by switching most OS gating logic from inputs.os string matching to runner.os, and by adding vars.SELF_HOSTED conditions to skip GitHub-hosted-only steps (e.g., some installs and deploys).
Changes:
- Replace
inputs.os-based conditions withrunner.oschecks across build workflows. - Add
vars.SELF_HOSTEDgating to avoid running package installs and release deployments on self-hosted runners. - Update the top-level
build_all.ymlto select self-hosted runner labels whenSELF_HOSTEDis set, including unit tests and Flatpak.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/build_orca.yml | Adjusts platform gating to use runner.os and adds self-hosted-aware deploy/install behavior. |
| .github/workflows/build_deps.yml | Updates OS condition checks and adds self-hosted-aware dependency installation logic. |
| .github/workflows/build_check_cache.yml | Changes cache key OS mapping to use runner.os (linux/windows/macos-arch). |
| .github/workflows/build_all.yml | Switches build/test jobs to self-hosted runner labels and adds Flatpak variant skip logic. |
Comments suppressed due to low confidence (2)
.github/workflows/build_orca.yml:392
- These paths use
${{ env.ubuntu-ver-str }}; with the currentenvkey name containing a hyphen, this expression may not resolve as intended. Rename the env var (underscore/uppercase) or switch to bracket access (env['ubuntu-ver-str']) everywhere it’s used to ensure the AppImage rename/chmod works.
./build_linux.sh -istr
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
chmod +x ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
tar -cvpf build_tests.tar build/tests
.github/workflows/build_deps.yml:126
- This step sets
env: ubuntu-ver: '2404'and then references it as${{ env.ubuntu-ver }}. Because the key contains a hyphen, dot-notation may not resolve correctly in GitHub Actions expressions. Rename the variable (e.g.UBUNTU_VER) or use bracket access (env['ubuntu-ver']) in the artifact name.
- name: Upload Ubuntu artifacts
if: runner.os == 'Linux' && !env.ACT
env:
ubuntu-ver: '2404'
uses: actions/upload-artifact@v6
with:
name: OrcaSlicer_dep_ubuntu_${{ env.ubuntu-ver }}_${{ env.date }}
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+164
to
+169
| steps: | ||
| - name: Check if variant should run | ||
| id: should-run | ||
| run: echo "skip=true" >> $GITHUB_OUTPUT | ||
| shell: bash | ||
| if: ${{ vars.SELF_HOSTED && !matrix.variant.self-hosted-runner }} |
Comment on lines
172
to
173
| run: | ||
| rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*" /opt/hostedtoolcache1/* |
Comment on lines
+149
to
+159
| variant: | ||
| - arch: x86_64 | ||
| runner: ubuntu-24.04 | ||
| self-hosted-runner: orca-lnx-server | ||
| - arch: aarch64 | ||
| runner: ubuntu-24.04-arm | ||
| # Don't run scheduled builds on forks: | ||
| # Don't run scheduled builds on forks | ||
| if: ${{ !cancelled() && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }} | ||
| runs-on: ${{ matrix.variant.runner }} | ||
| # When SELF_HOSTED is set, use self-hosted runner if available, otherwise fall back to | ||
| # cheapest GitHub runner (variant will be skipped via step conditions anyway) | ||
| runs-on: ${{ vars.SELF_HOSTED && (matrix.variant.self-hosted-runner || 'ubuntu-24.04') || matrix.variant.runner }} |
Comment on lines
25
to
31
| env: | ||
| date: | ||
| ver: | ||
| ver_pure: | ||
| ubuntu-ver: '2404' | ||
| ubuntu-ver-str: '_Ubuntu2404' | ||
| ORCA_UPDATER_SIG_KEY: ${{ secrets.ORCA_UPDATER_SIG_KEY }} |
Comment on lines
+41
to
+42
| echo cache-key=${{ env.cache-os }}-cache-orcaslicer_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }} | ||
| echo cache-path=${{ github.workspace }}/deps/build${{ env.dep-folder-name }} >> ${{ env.output-cmd }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Screenshots/Recordings/Graphs
Tests