mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 00:42:32 -07:00
Initial release
This commit is contained in:
133
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
133
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
name: 🐞 Bug Report
|
||||
description: File a bug report
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Thank you for using Orca Slicer and wanting to report a bug.**
|
||||
|
||||
Please note that this is not the place to make feature requests or ask for help.
|
||||
For this, please use the [Feature request](https://github.com/OrcaSlicer/OrcaSlicer/issues/new?assignees=&labels=&projects=&template=feature_request.yml) issue type or you can discuss your idea on our [Discord server](https://discord.gg/P4VE9UY9gJ) with others.
|
||||
|
||||
Before filing, please check if the issue already exists (either open or closed) by using the search bar on the issues page. If it does, comment there. Even if it's closed, we can reopen it based on your comment.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this problem?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: OrcaSlicer Version
|
||||
description: Which version of Orca Slicer are you running? You can see the full version in `Help` -> `About Orca Slicer`.
|
||||
placeholder: e.g. 1.9.0
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: os_type
|
||||
attributes:
|
||||
label: "Operating System (OS)"
|
||||
description: "What OSes are you are experiencing issues on?"
|
||||
multiple: true
|
||||
options:
|
||||
- Linux
|
||||
- macOS
|
||||
- Windows
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: os_version
|
||||
attributes:
|
||||
label: "OS Version"
|
||||
description: "What OS version does this relate to?"
|
||||
placeholder: "i.e. OS: Windows 7/8/10/11 ..., Ubuntu 22.04/Fedora 36 ..., macOS 10.15/11.1/12.3 ..."
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: system_info
|
||||
attributes:
|
||||
label: Additional system information
|
||||
description: For the performance issue, please also show the CPU, Memory information; For the 3D Rendering issue, please also show the Display Card information.
|
||||
placeholder: |
|
||||
CPU: 11th gen Intel r core tm i7-1185g7/AMD Ryzen 7 6800h/...
|
||||
Memory: 32/16 GB...
|
||||
Display Card: NVIDIA Quadro P400/...
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: printer
|
||||
attributes:
|
||||
label: Printer
|
||||
description: Which printer was selected
|
||||
placeholder: Voron 2.4/VzBot/Prusa MK4/Bambu Lab X1 series/Bambu Lab P1P/...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduce_steps
|
||||
attributes:
|
||||
label: How to reproduce
|
||||
description: Please described the detailed steps to reproduce this issue
|
||||
placeholder: |
|
||||
1. Go to '...'
|
||||
2. Click on '...'
|
||||
3. Scroll down to '...'
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: actual_results
|
||||
attributes:
|
||||
label: Actual results
|
||||
description: What happens after the above steps? Please, enclose a screenshot whenever possible (even when you think the description is clear).
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected_results
|
||||
attributes:
|
||||
label: Expected results
|
||||
description: What should happen after the above steps?
|
||||
validations:
|
||||
required: true
|
||||
- type: markdown
|
||||
id: file_required
|
||||
attributes:
|
||||
value: |
|
||||
Please be sure to add the following files:
|
||||
* Please upload a ZIP archive containing the **project file** used when the problem arise. Please export it just before or after the problem occurs. Even if you did nothing and/or there is no object, export it! (We need the configurations in project file).
|
||||
You can export the project file from the application menu in `File`->`Save project as...`, then zip it
|
||||
* A **log file** for crashes and similar issues.
|
||||
You can find your log file here:
|
||||
Windows: `%APPDATA%\OrcaSlicer\log` or usually `C:\Users\<your username>\AppData\Roaming\OrcaSlicer\log`
|
||||
MacOS: `$HOME/Library/Application Support/OrcaSlicer/log`
|
||||
Linux: `$HOME/.config/OrcaSlicer/log`
|
||||
If Orca Slicer still starts, you can also reach this directory from the application menu in `Help` -> `Show Configuration Folder`
|
||||
You can zip the log directory, or just select the newest logs when this issue happens, and zip them
|
||||
- type: textarea
|
||||
id: file_uploads
|
||||
attributes:
|
||||
label: Project file & Debug log uploads
|
||||
description: Drop the project file and debug log here
|
||||
placeholder: |
|
||||
Project File: `File` -> `Save project as...` then zip it & drop it here
|
||||
Log File: `Help` -> `Show Configuration Folder`, then zip the log directory, or just select the newest logs in `log` when this issue happens and zip them, then drop the zip file here
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: file_checklist
|
||||
attributes:
|
||||
label: Checklist of files to include
|
||||
options:
|
||||
- label: Log file
|
||||
- label: Project file
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Screenshots? References? Anything that will give us more context about the issue you are encountering!
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Community Support (Discord channel)
|
||||
url: https://discord.gg/P4VE9UY9gJ
|
||||
about: Please ask and answer support "how do I?"questions here.
|
||||
- name: Discussion Forum
|
||||
url: https://github.com/OrcaSlicer/OrcaSlicer/discussions
|
||||
about: Please raise ideas and feature suggestions here.
|
||||
66
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
66
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
name: 🚀 Feature Request / Enhancement
|
||||
description: Suggest an improvement to make Orca Slicer even better!
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request!
|
||||
|
||||
If your idea is still at the formulation stage, or you're not sure it would
|
||||
be useful to many users, you can raise it as a discussion topic under [Ideas](https://github.com/OrcaSlicer/OrcaSlicer/discussions/categories/ideas)
|
||||
or you can raise it on the [Discord server](https://discord.gg/P4VE9UY9gJ).
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this feature request?
|
||||
description: |
|
||||
Please search to see if an issue already exists for a feature, or perhaps one similar.
|
||||
You can then comment and react so that we know know much interest there is in the feature request.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem?
|
||||
description: A clear and concise description of what the problem is.
|
||||
placeholder: I'm always frustrated when [...]
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Which printers will be beneficial to this feature?
|
||||
description: Select affected printer firmware type.
|
||||
multiple: true
|
||||
options:
|
||||
- Klipper
|
||||
- Marlin
|
||||
- Others
|
||||
- All
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
description: A clear and concise description of what you want to happen.
|
||||
placeholder: It should do [...]
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe alternatives you've considered
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
placeholder: |
|
||||
1. [...]
|
||||
2. [...]
|
||||
3. [...]
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: |
|
||||
Add any other context, diagrams, illustations or screenshots about the feature request here.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
11
.github/actions/apt-install-deps/action.yml
vendored
Normal file
11
.github/actions/apt-install-deps/action.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
name: 'Apt Install Deps'
|
||||
description: 'Install the packages needed for building and deploying'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Install dependencies from build_linux.sh
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/deps/build/OrcaSlicer_dep
|
||||
sudo env "ORCA_UPDATER_SIG_KEY=$ORCA_UPDATER_SIG_KEY" ./build_linux.sh -ur
|
||||
sudo chown $USER -R ./
|
||||
18
.github/dependabot.yml
vendored
Normal file
18
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
version: 2
|
||||
updates:
|
||||
# Only care about major updates to github actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
ignore: # Only suggest major updates for built-in actions
|
||||
- dependency-name: "github/*"
|
||||
update-types: ["version-update:semver-patch", "version-update:semver-minor"]
|
||||
- dependency-name: "actions/*"
|
||||
update-types: ["version-update:semver-patch", "version-update:semver-minor"]
|
||||
# Docker dependencies
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
# no support for c/cpp
|
||||
21
.github/pull_request_template.md
vendored
Normal file
21
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Description
|
||||
|
||||
<!--
|
||||
> Please provide a summary of the changes made in this PR. Include details such as:
|
||||
> * What issue does this PR address or fix?
|
||||
> * What new features or enhancements does this PR introduce?
|
||||
> * Are there any breaking changes or dependencies that need to be considered?
|
||||
-->
|
||||
|
||||
# Screenshots/Recordings/Graphs
|
||||
|
||||
<!--
|
||||
> Please attach relevant screenshots to showcase the UI changes.
|
||||
> Please attach images that can help explain the changes.
|
||||
-->
|
||||
|
||||
## Tests
|
||||
|
||||
<!--
|
||||
> Please describe the tests that you have conducted to verify the changes made in this PR.
|
||||
-->
|
||||
26
.github/workflows/assign.yml
vendored
Normal file
26
.github/workflows/assign.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Assign Issue
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 0 * * *
|
||||
issue_comment:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
assign:
|
||||
permissions:
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Assign the user or unassign stale assignments
|
||||
# Note: v3.0.0 is broken (dist/index.mjs vs action.yml expects index.js)
|
||||
# See: https://github.com/takanome-dev/assign-issue-action/issues/426
|
||||
uses: takanome-dev/assign-issue-action@v2.2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
maintainers: 'noisyfox,softfever'
|
||||
days_until_unassign: 30
|
||||
block_assignment: false
|
||||
reminder_days: 7
|
||||
max_assignments: 12
|
||||
31
.github/workflows/auto-close-duplicates.yml
vendored
Normal file
31
.github/workflows/auto-close-duplicates.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Auto-close duplicate issues
|
||||
description: Auto-closes issues that are duplicates of existing issues
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 9 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
auto-close-duplicates:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Auto-close duplicate issues
|
||||
run: bun run scripts/auto-close-duplicates.ts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
|
||||
GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
|
||||
STATSIG_API_KEY: ${{ secrets.STATSIG_API_KEY }}
|
||||
44
.github/workflows/backfill-duplicate-comments.yml
vendored
Normal file
44
.github/workflows/backfill-duplicate-comments.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Backfill Duplicate Comments
|
||||
description: Triggers duplicate detection for old issues that don't have duplicate comments
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
days_back:
|
||||
description: 'How many days back to look for old issues'
|
||||
required: false
|
||||
default: '90'
|
||||
type: string
|
||||
dry_run:
|
||||
description: 'Dry run mode (true to only log what would be done)'
|
||||
required: false
|
||||
default: 'true'
|
||||
type: choice
|
||||
options:
|
||||
- 'true'
|
||||
- 'false'
|
||||
|
||||
jobs:
|
||||
backfill-duplicate-comments:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
actions: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Backfill duplicate comments
|
||||
run: bun run scripts/backfill-duplicate-comments.ts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DAYS_BACK: ${{ inputs.days_back }}
|
||||
DRY_RUN: ${{ inputs.dry_run }}
|
||||
55
.github/workflows/build_all.yml
vendored
Normal file
55
.github/workflows/build_all.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Build all (manual only)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
build-deps-only:
|
||||
description: 'Only build dependencies (bypasses caching)'
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-lnx-server' || 'ubuntu-24.04' }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
secrets: inherit
|
||||
|
||||
build_windows:
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-win-server' || 'windows-latest' }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
secrets: inherit
|
||||
|
||||
build_macos_arch:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- arm64
|
||||
- x86_64
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-macos-arm64' || 'macos-14' }}
|
||||
arch: ${{ matrix.arch }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
secrets: inherit
|
||||
|
||||
build_macos_universal:
|
||||
name: Build macOS Universal
|
||||
needs: build_macos_arch
|
||||
if: ${{ !cancelled() && needs.build_macos_arch.result == 'success' && !inputs.build-deps-only }}
|
||||
uses: ./.github/workflows/build_orca.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-macos-arm64' || 'macos-14' }}
|
||||
arch: universal
|
||||
macos-combine-only: true
|
||||
secrets: inherit
|
||||
64
.github/workflows/build_check_cache.yml
vendored
Normal file
64
.github/workflows/build_check_cache.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
name: Check Cache
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
os:
|
||||
required: true
|
||||
type: string
|
||||
arch:
|
||||
required: false
|
||||
type: string
|
||||
build-deps-only:
|
||||
required: false
|
||||
type: boolean
|
||||
force-build:
|
||||
required: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
check_cache: # determines if there is a cache and outputs variables used in caching process
|
||||
name: Check Cache
|
||||
runs-on: ${{ inputs.os }}
|
||||
outputs:
|
||||
cache-key: ${{ steps.set_outputs.outputs.cache-key }}
|
||||
cache-path: ${{ steps.set_outputs.outputs.cache-path }}
|
||||
valid-cache: ${{ steps.cache_deps.outputs.cache-hit }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- name: set outputs
|
||||
id: set_outputs
|
||||
env:
|
||||
# Keep macOS cache keys and paths architecture-specific.
|
||||
cache-os: ${{ runner.os == 'macOS' && format('macos-{0}', inputs.arch) || (runner.os == 'Windows' && 'windows' || 'linux-clang') }}
|
||||
dep-folder-name: ${{ runner.os == 'macOS' && format('/{0}', inputs.arch) || '/OrcaSlicer_dep' }}
|
||||
output-cmd: ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}}
|
||||
run: |
|
||||
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 }}
|
||||
|
||||
- name: load cache
|
||||
id: cache_deps
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ steps.set_outputs.outputs.cache-path }}
|
||||
key: ${{ steps.set_outputs.outputs.cache-key }}
|
||||
lookup-only: true
|
||||
|
||||
build_deps: # call next step
|
||||
name: Build Deps
|
||||
needs: [check_cache]
|
||||
uses: ./.github/workflows/build_deps.yml
|
||||
with:
|
||||
cache-key: ${{ needs.check_cache.outputs.cache-key }}
|
||||
cache-path: ${{ needs.check_cache.outputs.cache-path }}
|
||||
valid-cache: ${{ needs.check_cache.outputs.valid-cache == 'true' }}
|
||||
os: ${{ inputs.os }}
|
||||
arch: ${{ inputs.arch }}
|
||||
build-deps-only: ${{ inputs.build-deps-only }}
|
||||
force-build: ${{ inputs.force-build }}
|
||||
secrets: inherit
|
||||
140
.github/workflows/build_deps.yml
vendored
Normal file
140
.github/workflows/build_deps.yml
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key:
|
||||
required: true
|
||||
type: string
|
||||
cache-path:
|
||||
required: true
|
||||
type: string
|
||||
valid-cache:
|
||||
required: true
|
||||
type: boolean
|
||||
os:
|
||||
required: true
|
||||
type: string
|
||||
arch:
|
||||
required: false
|
||||
type: string
|
||||
build-deps-only:
|
||||
required: false
|
||||
type: boolean
|
||||
force-build:
|
||||
required: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
build_deps:
|
||||
name: Build Deps
|
||||
if: ${{ !cancelled() && (inputs.build-deps-only || inputs.force-build || inputs.valid-cache != true) }}
|
||||
runs-on: ${{ inputs.os }}
|
||||
env:
|
||||
date:
|
||||
steps:
|
||||
|
||||
# Setup the environment
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- name: load cached deps
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ inputs.cache-path }}
|
||||
key: ${{ inputs.cache-key }}
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0" # use most recent 4.3.x version
|
||||
useLocalCache: true # <--= Use the local cache (default is 'false').
|
||||
useCloudCache: true
|
||||
|
||||
- name: setup dev on Windows
|
||||
if: runner.os == 'Windows'
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
|
||||
- name: Get the date on Ubuntu and macOS
|
||||
if: runner.os != 'Windows'
|
||||
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Get the date on Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||
shell: pwsh
|
||||
|
||||
|
||||
# Build Dependencies
|
||||
- name: Build on Windows
|
||||
if: runner.os == 'Windows'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
if (-not "${{ vars.SELF_HOSTED }}") {
|
||||
choco install strawberryperl
|
||||
}
|
||||
.\build_release_vs.bat deps
|
||||
.\build_release_vs.bat pack
|
||||
shell: pwsh
|
||||
|
||||
- name: Build on Mac ${{ inputs.arch }}
|
||||
if: runner.os == 'macOS'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
if [ -z "${{ vars.SELF_HOSTED }}" ]; then
|
||||
brew install automake texinfo libtool
|
||||
fi
|
||||
./build_release_macos.sh -dx ${{ !vars.SELF_HOSTED && '-1' || '' }} -a ${{ inputs.arch }} -t 10.15
|
||||
(cd "${{ github.workspace }}/deps/build/${{ inputs.arch }}" && \
|
||||
find . -mindepth 1 -maxdepth 1 ! -name 'OrcaSlicer_dep' -exec rm -rf {} +)
|
||||
|
||||
|
||||
- name: Apt-Install Dependencies
|
||||
if: runner.os == 'Linux' && !vars.SELF_HOSTED
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
- name: Build on Ubuntu
|
||||
if: runner.os == 'Linux'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/deps/build/destdir
|
||||
./build_linux.sh -drlL
|
||||
cd deps/build
|
||||
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir
|
||||
|
||||
|
||||
# Upload Artifacts
|
||||
# - name: Upload Mac ${{ inputs.arch }} artifacts
|
||||
# if: runner.os == 'macOS'
|
||||
# uses: actions/upload-artifact@v6
|
||||
# with:
|
||||
# name: OrcaSlicer_dep_mac_${{ env.date }}
|
||||
# path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.tar.gz
|
||||
|
||||
# - name: Upload Windows artifacts
|
||||
# if: runner.os == 'Windows'
|
||||
# uses: actions/upload-artifact@v6
|
||||
# with:
|
||||
# name: OrcaSlicer_dep_win64_${{ env.date }}
|
||||
# path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip
|
||||
|
||||
# - 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
|
||||
|
||||
build_orca:
|
||||
name: Build OrcaSlicer
|
||||
needs: [build_deps]
|
||||
if: ${{ !cancelled() && !inputs.build-deps-only && (inputs.force-build || (inputs.valid-cache == true && needs.build_deps.result == 'skipped') || (inputs.valid-cache != true && success())) }}
|
||||
uses: ./.github/workflows/build_orca.yml
|
||||
with:
|
||||
cache-key: ${{ inputs.cache-key }}
|
||||
cache-path: ${{ inputs.cache-path }}
|
||||
os: ${{ inputs.os }}
|
||||
arch: ${{ inputs.arch }}
|
||||
secrets: inherit
|
||||
120
.github/workflows/build_linux_appimage.yml
vendored
Normal file
120
.github/workflows/build_linux_appimage.yml
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
name: Build Linux AppImage
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: build-linux-appimage-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CACHE_REV: v1
|
||||
|
||||
jobs:
|
||||
linux_appimage_ubuntu24:
|
||||
name: Linux AppImage (ubuntu-24.04)
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 360
|
||||
env:
|
||||
DIST_ID: ubuntu24.04
|
||||
EVENT_TAG: ${{ github.event.release.tag_name }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Compute version
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="${EVENT_TAG:-${GITHUB_REF_NAME:-}}"
|
||||
if [[ "$tag" == v* ]]; then
|
||||
ver="${tag#v}"
|
||||
else
|
||||
ver="git${GITHUB_SHA::7}"
|
||||
fi
|
||||
echo "VER=$ver" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Compute deps cache key
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
deps_tree="$(git rev-parse HEAD:deps 2>/dev/null || echo no-deps)"
|
||||
recipe_hash="$(find build_linux.sh scripts/linux.d -type f -print0 | sort -z | xargs -0 cat | sha256sum | cut -c1-12)"
|
||||
echo "DEPS_CACHE_KEY=linux-${DIST_ID}-deps-${deps_tree}-${recipe_hash}-${CACHE_REV}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Apt-Install Dependencies
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
- name: Linux - cache deps
|
||||
id: cache_linux_deps
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep
|
||||
key: ${{ env.DEPS_CACHE_KEY }}
|
||||
|
||||
- name: Linux - build deps if missing
|
||||
if: steps.cache_linux_deps.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for attempt in 1 2 3; do
|
||||
echo "Build Linux deps attempt $attempt"
|
||||
if ./build_linux.sh -drlL; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$attempt" -lt 3 ]; then
|
||||
echo "Transient dependency download/build failure, retrying after backoff"
|
||||
sleep $((attempt * 20))
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
|
||||
- name: Linux - build AppImage
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf build build-dbg build-dbginfo out
|
||||
mkdir -p out
|
||||
|
||||
./build_linux.sh -istrlL
|
||||
./scripts/check_appimage_libs.sh ./build/package ./build/package/bin/orca-slicer
|
||||
|
||||
mapfile -t appimages < <(find build -maxdepth 3 -type f -name '*.AppImage' ! -name 'appimagetool.AppImage' | LC_ALL=C sort)
|
||||
|
||||
if (( ${#appimages[@]} == 0 )); then
|
||||
echo "ERROR: AppImage not produced"
|
||||
find build -maxdepth 3 -type f | LC_ALL=C sort
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if (( ${#appimages[@]} > 1 )); then
|
||||
echo "INFO: multiple AppImage candidates found, using the first sorted entry"
|
||||
printf '%s\n' "${appimages[@]}"
|
||||
fi
|
||||
|
||||
appimage="${appimages[0]}"
|
||||
mv "$appimage" "out/OrcaSlicer-BMCU_Linux_AppImage_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
chmod +x "out/OrcaSlicer-BMCU_Linux_AppImage_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
|
||||
- name: Linux - checksums
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd out && sha256sum * > "SHA256SUMS_${DIST_ID}_appimage.txt")
|
||||
|
||||
- name: Upload artifacts (Linux AppImage ubuntu24.04)
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: orcaslicer-bmcu-linux-appimage-${{ env.DIST_ID }}-${{ github.sha }}
|
||||
path: out/
|
||||
if-no-files-found: error
|
||||
439
.github/workflows/build_linux_portable.yml
vendored
Normal file
439
.github/workflows/build_linux_portable.yml
vendored
Normal file
@@ -0,0 +1,439 @@
|
||||
name: Build Linux Portable
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: build-linux-portable-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CACHE_REV: v1
|
||||
|
||||
jobs:
|
||||
linux_ubuntu22:
|
||||
name: Linux (ubuntu-22.04)
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 360
|
||||
env:
|
||||
DIST_ID: ubuntu22.04
|
||||
EVENT_TAG: ${{ github.event.release.tag_name }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Compute version
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="${EVENT_TAG:-${GITHUB_REF_NAME:-}}"
|
||||
if [[ "$tag" == v* ]]; then
|
||||
ver="${tag#v}"
|
||||
else
|
||||
ver="git${GITHUB_SHA::7}"
|
||||
fi
|
||||
echo "VER=$ver" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Compute deps cache key
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
deps_tree="$(git rev-parse HEAD:deps 2>/dev/null || echo no-deps)"
|
||||
recipe_hash="$(find build_linux.sh scripts/linux.d -type f -print0 | sort -z | xargs -0 cat | sha256sum | cut -c1-12)"
|
||||
echo "DEPS_CACHE_KEY=linux-${DIST_ID}-deps-${deps_tree}-${recipe_hash}-${CACHE_REV}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Apt-Install Dependencies
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
- name: Linux - cache deps
|
||||
id: cache_linux_deps
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep
|
||||
key: ${{ env.DEPS_CACHE_KEY }}
|
||||
|
||||
- name: Linux - build deps if missing
|
||||
if: steps.cache_linux_deps.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for attempt in 1 2 3; do
|
||||
echo "Build Linux deps attempt $attempt"
|
||||
if ./build_linux.sh -drlL; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$attempt" -lt 3 ]; then
|
||||
echo "Transient dependency download/build failure, retrying after backoff"
|
||||
sleep $((attempt * 20))
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
|
||||
- name: Linux - build + install
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf build install-dir out
|
||||
mkdir -p out
|
||||
|
||||
cmake -S . -B build -G "Ninja Multi-Config" \
|
||||
-DCMAKE_PREFIX_PATH="${PWD}/deps/build/OrcaSlicer_dep/usr/local" \
|
||||
-DSLIC3R_STATIC=1 \
|
||||
-DSLIC3R_GTK=3 \
|
||||
-DBBL_RELEASE_TO_PUBLIC=1 \
|
||||
-DBBL_INTERNAL_TESTING=0 \
|
||||
-DSLIC3R_PCH=ON \
|
||||
-DORCA_TOOLS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="${PWD}/install-dir"
|
||||
|
||||
cmake --build build --config Release --target install -j"$(nproc)"
|
||||
|
||||
./scripts/run_gettext.sh
|
||||
mkdir -p install-dir/resources/i18n
|
||||
cp -a resources/i18n/. install-dir/resources/i18n/
|
||||
|
||||
app_bin=""
|
||||
for candidate in \
|
||||
"install-dir/bin/OrcaSlicer" \
|
||||
"install-dir/bin/orca-slicer" \
|
||||
"install-dir/OrcaSlicer" \
|
||||
"install-dir/orca-slicer"; do
|
||||
if [ -x "$candidate" ]; then
|
||||
app_bin="${candidate#install-dir/}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$app_bin" ]; then
|
||||
echo "ERROR: installed OrcaSlicer binary not found"
|
||||
find install-dir -maxdepth 3 -type f | sort
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "APP_BIN=$app_bin" >> "$GITHUB_ENV"
|
||||
tar -C install-dir -czf "out/OrcaSlicer-BMCU_LinuxDir_${DIST_ID}_amd64_${VER}.tar.gz" .
|
||||
|
||||
- name: Linux - build AppImage (best-effort)
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -x "build/src/build_linux_image.sh" ]; then
|
||||
(cd build && ./src/build_linux_image.sh -i -R Release) || true
|
||||
fi
|
||||
|
||||
appimage="$(find build -maxdepth 3 -type f -name '*.AppImage' | head -n 1 || true)"
|
||||
if [ -n "$appimage" ]; then
|
||||
mv "$appimage" "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
chmod +x "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
else
|
||||
echo "WARN: no AppImage produced"
|
||||
fi
|
||||
|
||||
- name: Linux - build .deb from install-dir
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y dpkg-dev fakeroot binutils
|
||||
|
||||
rm -rf pkgroot debian
|
||||
mkdir -p pkgroot/DEBIAN pkgroot/opt/orcaslicer pkgroot/usr/bin
|
||||
cp -a install-dir/. pkgroot/opt/orcaslicer/
|
||||
|
||||
cat > pkgroot/usr/bin/orca-slicer-bmcu <<EOF
|
||||
#!/bin/sh
|
||||
exec /opt/orcaslicer/${APP_BIN} "$@"
|
||||
EOF
|
||||
chmod 0755 pkgroot/usr/bin/orca-slicer-bmcu
|
||||
|
||||
if [[ "${EVENT_TAG:-${GITHUB_REF_NAME:-}}" == v* ]]; then
|
||||
deb_ver="${VER}~${DIST_ID}"
|
||||
else
|
||||
deb_ver="0.0~${VER}~${DIST_ID}"
|
||||
fi
|
||||
|
||||
mkdir -p debian
|
||||
cat > debian/control <<'EOF'
|
||||
Source: orcaslicer-bmcu
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: PJARCZAK CI <ci@invalid>
|
||||
Standards-Version: 4.6.2
|
||||
|
||||
Package: orcaslicer-bmcu
|
||||
Architecture: amd64
|
||||
Description: dummy control for dpkg-shlibdeps
|
||||
EOF
|
||||
|
||||
depends=""
|
||||
if [ -x "pkgroot/opt/orcaslicer/${APP_BIN}" ]; then
|
||||
set +e
|
||||
out="$(dpkg-shlibdeps --ignore-missing-info -O \
|
||||
-lpkgroot/opt/orcaslicer/bin \
|
||||
-lpkgroot/opt/orcaslicer/lib \
|
||||
-lpkgroot/opt/orcaslicer/lib64 \
|
||||
pkgroot/opt/orcaslicer/${APP_BIN} 2>&1)"
|
||||
rc=$?
|
||||
set -e
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
depends="$(printf "%s\n" "$out" | sed -n 's/^shlibs:Depends=//p' | tail -n 1)"
|
||||
else
|
||||
echo "WARN: dpkg-shlibdeps failed:"
|
||||
echo "$out"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$depends" ]]; then
|
||||
depends="libc6, libstdc++6, libgcc-s1"
|
||||
fi
|
||||
|
||||
cat > pkgroot/DEBIAN/control <<EOF
|
||||
Package: orcaslicer-bmcu
|
||||
Version: ${deb_ver}
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Maintainer: PJARCZAK CI <ci@invalid>
|
||||
Depends: ${depends}
|
||||
Description: OrcaSlicer BMCU build (installed in /opt/orcaslicer)
|
||||
Wrapper: /usr/bin/orca-slicer-bmcu
|
||||
EOF
|
||||
|
||||
fakeroot dpkg-deb --build pkgroot "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.deb"
|
||||
|
||||
- name: Linux - checksums
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd out && sha256sum * > "SHA256SUMS_${DIST_ID}.txt")
|
||||
|
||||
- name: Upload artifacts (Linux ubuntu22.04)
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: orcaslicer-bmcu-linux-${{ env.DIST_ID }}-${{ github.sha }}
|
||||
path: out/
|
||||
if-no-files-found: error
|
||||
|
||||
linux_ubuntu24:
|
||||
name: Linux (ubuntu-24.04)
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 360
|
||||
env:
|
||||
DIST_ID: ubuntu24.04
|
||||
EVENT_TAG: ${{ github.event.release.tag_name }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Compute version
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="${EVENT_TAG:-${GITHUB_REF_NAME:-}}"
|
||||
if [[ "$tag" == v* ]]; then
|
||||
ver="${tag#v}"
|
||||
else
|
||||
ver="git${GITHUB_SHA::7}"
|
||||
fi
|
||||
echo "VER=$ver" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Compute deps cache key
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
deps_tree="$(git rev-parse HEAD:deps 2>/dev/null || echo no-deps)"
|
||||
recipe_hash="$(find build_linux.sh scripts/linux.d -type f -print0 | sort -z | xargs -0 cat | sha256sum | cut -c1-12)"
|
||||
echo "DEPS_CACHE_KEY=linux-${DIST_ID}-deps-${deps_tree}-${recipe_hash}-${CACHE_REV}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Apt-Install Dependencies
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
- name: Linux - cache deps
|
||||
id: cache_linux_deps
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep
|
||||
key: ${{ env.DEPS_CACHE_KEY }}
|
||||
|
||||
- name: Linux - build deps if missing
|
||||
if: steps.cache_linux_deps.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for attempt in 1 2 3; do
|
||||
echo "Build Linux deps attempt $attempt"
|
||||
if ./build_linux.sh -drlL; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$attempt" -lt 3 ]; then
|
||||
echo "Transient dependency download/build failure, retrying after backoff"
|
||||
sleep $((attempt * 20))
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
|
||||
- name: Linux - build + install
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf build install-dir out
|
||||
mkdir -p out
|
||||
|
||||
cmake -S . -B build -G "Ninja Multi-Config" \
|
||||
-DCMAKE_PREFIX_PATH="${PWD}/deps/build/OrcaSlicer_dep/usr/local" \
|
||||
-DSLIC3R_STATIC=1 \
|
||||
-DSLIC3R_GTK=3 \
|
||||
-DBBL_RELEASE_TO_PUBLIC=1 \
|
||||
-DBBL_INTERNAL_TESTING=0 \
|
||||
-DSLIC3R_PCH=ON \
|
||||
-DORCA_TOOLS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="${PWD}/install-dir"
|
||||
|
||||
cmake --build build --config Release --target install -j"$(nproc)"
|
||||
|
||||
./scripts/run_gettext.sh
|
||||
mkdir -p install-dir/resources/i18n
|
||||
cp -a resources/i18n/. install-dir/resources/i18n/
|
||||
|
||||
app_bin=""
|
||||
for candidate in \
|
||||
"install-dir/bin/OrcaSlicer" \
|
||||
"install-dir/bin/orca-slicer" \
|
||||
"install-dir/OrcaSlicer" \
|
||||
"install-dir/orca-slicer"; do
|
||||
if [ -x "$candidate" ]; then
|
||||
app_bin="${candidate#install-dir/}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$app_bin" ]; then
|
||||
echo "ERROR: installed OrcaSlicer binary not found"
|
||||
find install-dir -maxdepth 3 -type f | sort
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "APP_BIN=$app_bin" >> "$GITHUB_ENV"
|
||||
tar -C install-dir -czf "out/OrcaSlicer-BMCU_LinuxDir_${DIST_ID}_amd64_${VER}.tar.gz" .
|
||||
|
||||
- name: Linux - build AppImage (best-effort)
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -x "build/src/build_linux_image.sh" ]; then
|
||||
(cd build && ./src/build_linux_image.sh -i -R Release) || true
|
||||
fi
|
||||
|
||||
appimage="$(find build -maxdepth 3 -type f -name '*.AppImage' | head -n 1 || true)"
|
||||
if [ -n "$appimage" ]; then
|
||||
mv "$appimage" "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
chmod +x "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.AppImage"
|
||||
else
|
||||
echo "WARN: no AppImage produced"
|
||||
fi
|
||||
|
||||
- name: Linux - build .deb from install-dir
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y dpkg-dev fakeroot binutils
|
||||
|
||||
rm -rf pkgroot debian
|
||||
mkdir -p pkgroot/DEBIAN pkgroot/opt/orcaslicer pkgroot/usr/bin
|
||||
cp -a install-dir/. pkgroot/opt/orcaslicer/
|
||||
|
||||
cat > pkgroot/usr/bin/orca-slicer-bmcu <<EOF
|
||||
#!/bin/sh
|
||||
exec /opt/orcaslicer/${APP_BIN} "$@"
|
||||
EOF
|
||||
chmod 0755 pkgroot/usr/bin/orca-slicer-bmcu
|
||||
|
||||
if [[ "${EVENT_TAG:-${GITHUB_REF_NAME:-}}" == v* ]]; then
|
||||
deb_ver="${VER}~${DIST_ID}"
|
||||
else
|
||||
deb_ver="0.0~${VER}~${DIST_ID}"
|
||||
fi
|
||||
|
||||
mkdir -p debian
|
||||
cat > debian/control <<'EOF'
|
||||
Source: orcaslicer-bmcu
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: PJARCZAK CI <ci@invalid>
|
||||
Standards-Version: 4.6.2
|
||||
|
||||
Package: orcaslicer-bmcu
|
||||
Architecture: amd64
|
||||
Description: dummy control for dpkg-shlibdeps
|
||||
EOF
|
||||
|
||||
depends=""
|
||||
if [ -x "pkgroot/opt/orcaslicer/${APP_BIN}" ]; then
|
||||
set +e
|
||||
out="$(dpkg-shlibdeps --ignore-missing-info -O \
|
||||
-lpkgroot/opt/orcaslicer/bin \
|
||||
-lpkgroot/opt/orcaslicer/lib \
|
||||
-lpkgroot/opt/orcaslicer/lib64 \
|
||||
pkgroot/opt/orcaslicer/${APP_BIN} 2>&1)"
|
||||
rc=$?
|
||||
set -e
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
depends="$(printf "%s\n" "$out" | sed -n 's/^shlibs:Depends=//p' | tail -n 1)"
|
||||
else
|
||||
echo "WARN: dpkg-shlibdeps failed:"
|
||||
echo "$out"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$depends" ]]; then
|
||||
depends="libc6, libstdc++6, libgcc-s1"
|
||||
fi
|
||||
|
||||
cat > pkgroot/DEBIAN/control <<EOF
|
||||
Package: orcaslicer-bmcu
|
||||
Version: ${deb_ver}
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Maintainer: PJARCZAK CI <ci@invalid>
|
||||
Depends: ${depends}
|
||||
Description: OrcaSlicer BMCU build (installed in /opt/orcaslicer)
|
||||
Wrapper: /usr/bin/orca-slicer-bmcu
|
||||
EOF
|
||||
|
||||
fakeroot dpkg-deb --build pkgroot "out/OrcaSlicer-BMCU_${DIST_ID}_amd64_${VER}.deb"
|
||||
|
||||
- name: Linux - checksums
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd out && sha256sum * > "SHA256SUMS_${DIST_ID}.txt")
|
||||
|
||||
- name: Upload artifacts (Linux ubuntu24.04)
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: orcaslicer-bmcu-linux-${{ env.DIST_ID }}-${{ github.sha }}
|
||||
path: out/
|
||||
if-no-files-found: error
|
||||
241
.github/workflows/build_macos_bridge.yml
vendored
Normal file
241
.github/workflows/build_macos_bridge.yml
vendored
Normal file
@@ -0,0 +1,241 @@
|
||||
name: Build macOS with Linux bridge runtime
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
prepare_linux_bridge_runtime:
|
||||
name: Prepare Linux bridge runtime
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Apt-Install Dependencies
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
- name: Build Linux deps
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for attempt in 1 2 3; do
|
||||
echo "Build Linux deps attempt $attempt"
|
||||
if ./build_linux.sh -drlL; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$attempt" -lt 3 ]; then
|
||||
echo "Transient dependency download/build failure, retrying after backoff"
|
||||
sleep $((attempt * 20))
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
|
||||
- name: Configure linux bridge host build
|
||||
shell: bash
|
||||
run: |
|
||||
cmake -S . -B build -G "Ninja Multi-Config" -DORCA_TOOLS=ON
|
||||
|
||||
- name: Build linux host runtime
|
||||
shell: bash
|
||||
run: |
|
||||
cmake --build build --config Release --target pjarczak_bambu_linux_host
|
||||
bash tools/pjarczak_bambu_linux_host/package_linux_host_runtime.sh build
|
||||
tar -czvf linux_host_runtime_${{ github.sha }}.tar.gz -C tools/pjarczak_bambu_linux_host/runtime linux-x86_64
|
||||
|
||||
- name: Upload linux host runtime artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: linux_host_runtime_${{ github.sha }}
|
||||
path: ./linux_host_runtime_${{ github.sha }}.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
build_macos_arm64:
|
||||
name: Build macOS arm64
|
||||
runs-on: macos-14
|
||||
needs: prepare_linux_bridge_runtime
|
||||
env:
|
||||
ORCA_UPDATER_SIG_KEY: ${{ secrets.ORCA_UPDATER_SIG_KEY }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Download linux host runtime artifact
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: linux_host_runtime_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/linux_host_runtime_artifact
|
||||
|
||||
- name: Extract linux host runtime artifact on macOS arm64
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "$GITHUB_WORKSPACE/tools/pjarczak_bambu_linux_host/runtime"
|
||||
tar -xzf "$GITHUB_WORKSPACE/linux_host_runtime_artifact/linux_host_runtime_${{ github.sha }}.tar.gz" -C "$GITHUB_WORKSPACE/tools/pjarczak_bambu_linux_host/runtime"
|
||||
|
||||
- name: Install mac tools
|
||||
shell: bash
|
||||
run: |
|
||||
brew install automake texinfo libtool
|
||||
brew list
|
||||
mkdir -p "$GITHUB_WORKSPACE/deps/build/arm64"
|
||||
|
||||
- name: Build macOS arm64 deps
|
||||
shell: bash
|
||||
run: |
|
||||
./build_release_macos.sh -dx -1 -a arm64 -t 11.3
|
||||
|
||||
- name: Build macOS arm64 app bundle
|
||||
shell: bash
|
||||
run: |
|
||||
./build_release_macos.sh -s -n -x -1 -a arm64 -t 11.3
|
||||
|
||||
- name: Pack macOS arm64 app bundle
|
||||
shell: bash
|
||||
run: |
|
||||
tar -czvf OrcaSlicer_Mac_bundle_arm64_${{ github.sha }}.tar.gz -C build/arm64 OrcaSlicer
|
||||
|
||||
- name: Upload macOS arm64 app bundle
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Mac_bundle_arm64_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/OrcaSlicer_Mac_bundle_arm64_${{ github.sha }}.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
build_macos_x86_64:
|
||||
name: Build macOS x86_64
|
||||
runs-on: macos-14
|
||||
needs: prepare_linux_bridge_runtime
|
||||
env:
|
||||
ORCA_UPDATER_SIG_KEY: ${{ secrets.ORCA_UPDATER_SIG_KEY }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Download linux host runtime artifact
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: linux_host_runtime_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/linux_host_runtime_artifact
|
||||
|
||||
- name: Extract linux host runtime artifact on macOS x86_64
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "$GITHUB_WORKSPACE/tools/pjarczak_bambu_linux_host/runtime"
|
||||
tar -xzf "$GITHUB_WORKSPACE/linux_host_runtime_artifact/linux_host_runtime_${{ github.sha }}.tar.gz" -C "$GITHUB_WORKSPACE/tools/pjarczak_bambu_linux_host/runtime"
|
||||
|
||||
- name: Install mac tools
|
||||
shell: bash
|
||||
run: |
|
||||
brew install automake texinfo libtool
|
||||
brew list
|
||||
mkdir -p "$GITHUB_WORKSPACE/deps/build/x86_64"
|
||||
|
||||
- name: Build macOS x86_64 deps
|
||||
shell: bash
|
||||
run: |
|
||||
./build_release_macos.sh -dx -1 -a x86_64 -t 11.3
|
||||
|
||||
- name: Build macOS x86_64 app bundle
|
||||
shell: bash
|
||||
run: |
|
||||
./build_release_macos.sh -s -n -x -1 -a x86_64 -t 11.3
|
||||
|
||||
- name: Pack macOS x86_64 app bundle
|
||||
shell: bash
|
||||
run: |
|
||||
tar -czvf OrcaSlicer_Mac_bundle_x86_64_${{ github.sha }}.tar.gz -C build/x86_64 OrcaSlicer
|
||||
|
||||
- name: Upload macOS x86_64 app bundle
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Mac_bundle_x86_64_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/OrcaSlicer_Mac_bundle_x86_64_${{ github.sha }}.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
build_macos_universal:
|
||||
name: Build macOS universal
|
||||
runs-on: macos-14
|
||||
needs:
|
||||
- build_macos_arm64
|
||||
- build_macos_x86_64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Download macOS app bundles
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: OrcaSlicer_Mac_bundle_*_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/mac_bundles
|
||||
|
||||
- name: Extract macOS app bundles
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p build/arm64 build/x86_64
|
||||
arm_bundle=$(find "$GITHUB_WORKSPACE/mac_bundles/OrcaSlicer_Mac_bundle_arm64_${{ github.sha }}" -name '*.tar.gz' -print -quit)
|
||||
x86_bundle=$(find "$GITHUB_WORKSPACE/mac_bundles/OrcaSlicer_Mac_bundle_x86_64_${{ github.sha }}" -name '*.tar.gz' -print -quit)
|
||||
tar -xzvf "$arm_bundle" -C "$GITHUB_WORKSPACE/build/arm64"
|
||||
tar -xzvf "$x86_bundle" -C "$GITHUB_WORKSPACE/build/x86_64"
|
||||
|
||||
- name: Build universal mac app bundle
|
||||
shell: bash
|
||||
run: |
|
||||
./build_release_macos.sh -u -x -1 -a universal -t 11.3
|
||||
|
||||
- name: Create DMG without runtime validation
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "$GITHUB_WORKSPACE/build/universal/OrcaSlicer_dmg"
|
||||
rm -rf "$GITHUB_WORKSPACE/build/universal/OrcaSlicer_dmg"/*
|
||||
cp -R "$GITHUB_WORKSPACE/build/universal/OrcaSlicer/OrcaSlicer.app" "$GITHUB_WORKSPACE/build/universal/OrcaSlicer_dmg/"
|
||||
ln -sfn /Applications "$GITHUB_WORKSPACE/build/universal/OrcaSlicer_dmg/Applications"
|
||||
ver=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder "$GITHUB_WORKSPACE/build/universal/OrcaSlicer_dmg" -ov -format UDZO "OrcaSlicer_Mac_universal_V${ver}.dmg"
|
||||
|
||||
- name: Explain skipped hosted runtime validation
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Hosted macOS runners do not support nested virtualization, so bundled Lima runtime validation is intentionally skipped here."
|
||||
|
||||
- name: Upload macOS universal DMG
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Mac_universal_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/OrcaSlicer_Mac_universal_V*.dmg
|
||||
if-no-files-found: error
|
||||
464
.github/workflows/build_orca.yml
vendored
Normal file
464
.github/workflows/build_orca.yml
vendored
Normal file
@@ -0,0 +1,464 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key:
|
||||
required: false
|
||||
type: string
|
||||
cache-path:
|
||||
required: false
|
||||
type: string
|
||||
os:
|
||||
required: true
|
||||
type: string
|
||||
arch:
|
||||
required: false
|
||||
type: string
|
||||
macos-combine-only:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build_orca:
|
||||
name: Build OrcaSlicer
|
||||
runs-on: ${{ inputs.os }}
|
||||
env:
|
||||
date:
|
||||
ver:
|
||||
ver_pure:
|
||||
ubuntu-ver: '2404'
|
||||
ubuntu-ver-str: '_Ubuntu2404'
|
||||
ORCA_UPDATER_SIG_KEY: ${{ secrets.ORCA_UPDATER_SIG_KEY }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- name: load cached deps
|
||||
if: ${{ !(runner.os == 'macOS' && inputs.macos-combine-only) }}
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ${{ inputs.cache-path }}
|
||||
key: ${{ inputs.cache-key }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0" # use most recent 4.3.x version
|
||||
useLocalCache: true # <--= Use the local cache (default is 'false').
|
||||
useCloudCache: true
|
||||
|
||||
- name: Get the version and date on Ubuntu and macOS
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
ver="PR-${{ github.event.number }}"
|
||||
git_commit_hash="${{ github.event.pull_request.head.sha }}"
|
||||
else
|
||||
ver=V$ver_pure
|
||||
git_commit_hash=""
|
||||
fi
|
||||
echo "ver=$ver" >> $GITHUB_ENV
|
||||
echo "ver_pure=$ver_pure" >> $GITHUB_ENV
|
||||
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
echo "git_commit_hash=$git_commit_hash" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Get the version and date on Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
$date = Get-Date -Format 'yyyyMMdd'
|
||||
$ref = "${{ github.ref }}"
|
||||
$eventName = "${{ github.event_name }}"
|
||||
$prNumber = "${{ github.event.number }}"
|
||||
|
||||
if ($eventName -eq 'pull_request') {
|
||||
$ver = "PR" + $prNumber
|
||||
$git_commit_hash = "${{ github.event.pull_request.head.sha }}"
|
||||
} else {
|
||||
$versionContent = Get-Content version.inc -Raw
|
||||
if ($versionContent -match 'set\(SoftFever_VERSION "(.*?)"\)') {
|
||||
$ver = $matches[1]
|
||||
}
|
||||
$ver = "V$ver"
|
||||
$git_commit_hash = ""
|
||||
}
|
||||
|
||||
echo "ver=$ver" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||
echo "date=$date" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||
echo "git_commit_hash=$git_commit_hash" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||
echo "date: ${{ env.date }} version: ${{ env.ver }}"
|
||||
shell: pwsh
|
||||
|
||||
# Mac
|
||||
- name: Install tools mac
|
||||
if: runner.os == 'macOS' && !inputs.macos-combine-only
|
||||
run: |
|
||||
if [ -z "${{ vars.SELF_HOSTED }}" ]; then
|
||||
brew install libtool
|
||||
brew list
|
||||
fi
|
||||
mkdir -p ${{ github.workspace }}/deps/build/${{ inputs.arch }}
|
||||
|
||||
- name: Free disk space
|
||||
if: runner.os == 'macOS' && !inputs.macos-combine-only && !vars.SELF_HOSTED
|
||||
run: |
|
||||
df -hI /dev/disk3s1s1
|
||||
sudo find /Applications -maxdepth 1 -type d -name "Xcode_*.app" ! -name "Xcode_15.4.app" -exec rm -rf {} +
|
||||
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/*
|
||||
df -hI /dev/disk3s1s1
|
||||
|
||||
- name: Build slicer mac
|
||||
if: runner.os == 'macOS' && !inputs.macos-combine-only
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
./build_release_macos.sh -s -n -x ${{ !vars.SELF_HOSTED && '-1' || '' }} -a ${{ inputs.arch }} -t 10.15
|
||||
|
||||
- name: Pack macOS app bundle ${{ inputs.arch }}
|
||||
if: runner.os == 'macOS' && !inputs.macos-combine-only
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
tar -czvf OrcaSlicer_Mac_bundle_${{ inputs.arch }}_${{ github.sha }}.tar.gz -C build/${{ inputs.arch }} OrcaSlicer
|
||||
|
||||
- name: Upload macOS app bundle ${{ inputs.arch }}
|
||||
if: runner.os == 'macOS' && !inputs.macos-combine-only
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Mac_bundle_${{ inputs.arch }}_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/OrcaSlicer_Mac_bundle_${{ inputs.arch }}_${{ github.sha }}.tar.gz
|
||||
|
||||
- name: Download macOS app bundles
|
||||
if: runner.os == 'macOS' && inputs.macos-combine-only
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: OrcaSlicer_Mac_bundle_*_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/mac_bundles
|
||||
|
||||
- name: Extract macOS app bundles
|
||||
if: runner.os == 'macOS' && inputs.macos-combine-only
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
mkdir -p build/arm64 build/x86_64
|
||||
arm_bundle=$(find "${{ github.workspace }}/mac_bundles/OrcaSlicer_Mac_bundle_arm64_${{ github.sha }}" -name '*.tar.gz' -print -quit)
|
||||
x86_bundle=$(find "${{ github.workspace }}/mac_bundles/OrcaSlicer_Mac_bundle_x86_64_${{ github.sha }}" -name '*.tar.gz' -print -quit)
|
||||
tar -xzvf "$arm_bundle" -C "${{ github.workspace }}/build/arm64"
|
||||
tar -xzvf "$x86_bundle" -C "${{ github.workspace }}/build/x86_64"
|
||||
|
||||
- name: Build universal mac app bundle
|
||||
if: runner.os == 'macOS' && inputs.macos-combine-only
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
./build_release_macos.sh -u -x ${{ !vars.SELF_HOSTED && '-1' || '' }} -a universal -t 10.15
|
||||
|
||||
- name: Delete intermediate per-arch artifacts
|
||||
if: runner.os == 'macOS' && inputs.macos-combine-only
|
||||
uses: geekyeggo/delete-artifact@v6
|
||||
with:
|
||||
name: |
|
||||
OrcaSlicer_Mac_bundle_arm64_${{ github.sha }}
|
||||
OrcaSlicer_Mac_bundle_x86_64_${{ github.sha }}
|
||||
|
||||
# Thanks to RaySajuuk, it's working now
|
||||
- name: Sign app and notary
|
||||
if: github.repository == 'OrcaSlicer/OrcaSlicer' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && runner.os == 'macOS' && inputs.macos-combine-only
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||
CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }}
|
||||
run: |
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
|
||||
security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH
|
||||
# Set the temporary keychain as the default to prevent codesign from accessing the locked login keychain
|
||||
security default-keychain -s "$KEYCHAIN_PATH"
|
||||
security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH
|
||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app
|
||||
# Sign OrcaSlicer_profile_validator.app if it exists
|
||||
if [ -f "${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app/Contents/MacOS/OrcaSlicer_profile_validator" ]; then
|
||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app
|
||||
fi
|
||||
|
||||
# Create main OrcaSlicer DMG without the profile validator helper
|
||||
mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_dmg
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
|
||||
# Create separate OrcaSlicer_profile_validator DMG if the app exists
|
||||
if [ -f "${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app/Contents/MacOS/OrcaSlicer_profile_validator" ]; then
|
||||
mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
fi
|
||||
|
||||
# Notarize main DMG
|
||||
xcrun notarytool submit "OrcaSlicer_Mac_universal_${{ env.ver }}.dmg" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}" --wait
|
||||
xcrun stapler staple OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
|
||||
# Notarize profile validator DMG if it exists
|
||||
if [ -f "OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg" ]; then
|
||||
xcrun notarytool submit "OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}" --wait
|
||||
xcrun stapler staple OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
fi
|
||||
|
||||
- name: Create DMG without notary
|
||||
if: github.ref != 'refs/heads/main' && runner.os == 'macOS' && inputs.macos-combine-only
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_dmg
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
|
||||
# Create separate OrcaSlicer_profile_validator DMG if the app exists
|
||||
if [ -f "${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app/Contents/MacOS/OrcaSlicer_profile_validator" ]; then
|
||||
mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
fi
|
||||
|
||||
- name: Upload artifacts mac
|
||||
if: runner.os == 'macOS' && inputs.macos-combine-only
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Mac_universal_${{ env.ver }}
|
||||
path: ${{ github.workspace }}/OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
|
||||
- name: Upload OrcaSlicer_profile_validator DMG mac
|
||||
if: runner.os == 'macOS' && inputs.macos-combine-only && !vars.SELF_HOSTED
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_profile_validator_Mac_universal_DMG_${{ env.ver }}
|
||||
path: ${{ github.workspace }}/OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Deploy Mac release
|
||||
if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' && runner.os == 'macOS' && inputs.macos-combine-only && !vars.SELF_HOSTED
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ${{ github.workspace }}/OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
asset_name: OrcaSlicer_Mac_universal_nightly.dmg
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||
|
||||
- name: Deploy Mac OrcaSlicer_profile_validator DMG release
|
||||
if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' && runner.os == 'macOS' && inputs.macos-combine-only && !vars.SELF_HOSTED
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ${{ github.workspace }}/OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
asset_name: OrcaSlicer_profile_validator_Mac_universal_nightly.dmg
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1
|
||||
|
||||
# Windows
|
||||
- name: setup MSVC
|
||||
if: runner.os == 'Windows'
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
|
||||
- name: Install nsis
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
run: |
|
||||
dir "C:/Program Files (x86)/Windows Kits/10/Include"
|
||||
choco install nsis
|
||||
|
||||
- name: Build slicer Win
|
||||
if: runner.os == 'Windows'
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\'
|
||||
WindowsSDKVersion: '10.0.26100.0\'
|
||||
run: .\build_release_vs.bat slicer
|
||||
|
||||
- name: Create installer Win
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
run: |
|
||||
cpack -G NSIS
|
||||
|
||||
- name: Pack app
|
||||
if: runner.os == 'Windows'
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
shell: cmd
|
||||
run: '"C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_Windows_${{ env.ver }}_portable.zip ${{ github.workspace }}/build/OrcaSlicer'
|
||||
|
||||
- name: Pack PDB
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
working-directory: ${{ github.workspace }}/build/src/Release
|
||||
shell: cmd
|
||||
run: '"C:/Program Files/7-Zip/7z.exe" a -m0=lzma2 -mx9 Debug_PDB_${{ env.ver }}_for_developers_only.7z *.pdb'
|
||||
|
||||
- name: Upload artifacts Win zip
|
||||
if: runner.os == 'Windows'
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Windows_${{ env.ver }}_portable
|
||||
path: ${{ github.workspace }}/build/OrcaSlicer
|
||||
|
||||
- name: Upload artifacts Win installer
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Windows_${{ env.ver }}
|
||||
path: ${{ github.workspace }}/build/OrcaSlicer*.exe
|
||||
|
||||
- name: Upload artifacts Win PDB
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: PDB
|
||||
path: ${{ github.workspace }}/build/src/Release/Debug_PDB_${{ env.ver }}_for_developers_only.7z
|
||||
|
||||
- name: Upload OrcaSlicer_profile_validator Win
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_profile_validator_Windows_${{ env.ver }}
|
||||
path: ${{ github.workspace }}/build/src/Release/OrcaSlicer_profile_validator.exe
|
||||
|
||||
- name: Deploy Windows release portable
|
||||
if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' && runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ${{ github.workspace }}/build/OrcaSlicer_Windows_${{ env.ver }}_portable.zip
|
||||
asset_name: OrcaSlicer_Windows_nightly_portable.zip
|
||||
asset_content_type: application/x-zip-compressed
|
||||
max_releases: 1
|
||||
|
||||
- name: Deploy Windows release installer
|
||||
if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' && runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ${{ github.workspace }}/build/OrcaSlicer_Windows_Installer_${{ env.ver }}.exe
|
||||
asset_name: OrcaSlicer_Windows_Installer_nightly.exe
|
||||
asset_content_type: application/x-msdownload
|
||||
max_releases: 1
|
||||
|
||||
- name: Deploy Windows OrcaSlicer_profile_validator release
|
||||
if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' && runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ${{ github.workspace }}/build/src/Release/OrcaSlicer_profile_validator.exe
|
||||
asset_name: OrcaSlicer_profile_validator_Windows_nightly.exe
|
||||
asset_content_type: application/x-msdownload
|
||||
max_releases: 1
|
||||
|
||||
# Ubuntu
|
||||
- name: Apt-Install Dependencies
|
||||
if: runner.os == 'Linux' && !vars.SELF_HOSTED
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
# Tests must built at the same time as the slicer;
|
||||
# if you untangle them feel free to separate them here too
|
||||
- name: Build slicer and tests
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
./build_linux.sh -istrlL
|
||||
./scripts/check_appimage_libs.sh ./build/package ./build/package/bin/orca-slicer
|
||||
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
|
||||
|
||||
# Use tar because upload-artifacts won't always preserve directory structure
|
||||
# and doesn't preserve file permissions
|
||||
- name: Upload Test Artifact
|
||||
if: runner.os == 'Linux'
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ github.sha }}-tests
|
||||
overwrite: true
|
||||
path: build_tests.tar
|
||||
retention-days: 5
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Build orca_custom_preset_tests
|
||||
if: github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED
|
||||
working-directory: ${{ github.workspace }}/build/src/Release
|
||||
shell: bash
|
||||
run: |
|
||||
./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -g 1
|
||||
cd ${{ github.workspace }}/resources/profiles
|
||||
zip -r orca_custom_preset_tests.zip user/
|
||||
|
||||
- name: Upload artifacts Ubuntu
|
||||
if: ${{ ! env.ACT && runner.os == 'Linux' }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
|
||||
path: './build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage'
|
||||
|
||||
- name: Upload OrcaSlicer_profile_validator Ubuntu
|
||||
if: ${{ ! env.ACT && runner.os == 'Linux' && !vars.SELF_HOSTED }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_profile_validator_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
|
||||
path: './build/src/Release/OrcaSlicer_profile_validator'
|
||||
|
||||
- name: Deploy Ubuntu release
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||
asset_name: OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_nightly.AppImage
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||
- name: Deploy Ubuntu release
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED }}
|
||||
uses: rickstaa/action-create-tag@v1
|
||||
with:
|
||||
tag: "nightly-builds"
|
||||
tag_exists_error: false
|
||||
force_push_tag: true
|
||||
message: "nightly-builds"
|
||||
|
||||
- name: Deploy Ubuntu OrcaSlicer_profile_validator release
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ./build/src/Release/OrcaSlicer_profile_validator
|
||||
asset_name: OrcaSlicer_profile_validator_Linux${{ env.ubuntu-ver-str }}_nightly
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1
|
||||
|
||||
- name: Deploy orca_custom_preset_tests
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ${{ github.workspace }}/resources/profiles/orca_custom_preset_tests.zip
|
||||
asset_name: orca_custom_preset_tests.zip
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1
|
||||
167
.github/workflows/build_rpm_fedora.yml
vendored
Normal file
167
.github/workflows/build_rpm_fedora.yml
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
name: Build RPM (Fedora)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: build-rpm-fedora-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
rpm_fedora41:
|
||||
name: RPM (fedora-41)
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: fedora:41
|
||||
timeout-minutes: 360
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
DIST_ID: fedora41
|
||||
EVENT_TAG: ${{ github.event.release.tag_name }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- name: Install system tools
|
||||
run: |
|
||||
set -euo pipefail
|
||||
dnf install -y \
|
||||
sudo \
|
||||
bash \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
ccache \
|
||||
curl \
|
||||
file \
|
||||
findutils \
|
||||
git \
|
||||
gzip \
|
||||
ninja-build \
|
||||
rpm-build \
|
||||
tar \
|
||||
which
|
||||
|
||||
- name: Compute version
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="${EVENT_TAG:-${GITHUB_REF_NAME:-}}"
|
||||
if [[ "$tag" == v* ]]; then
|
||||
ver="${tag#v}"
|
||||
else
|
||||
ver="git${GITHUB_SHA::7}"
|
||||
fi
|
||||
rpm_ver="$(printf '%s' "$ver" | tr -c 'A-Za-z0-9._' '_')"
|
||||
echo "VER=$ver" >> "$GITHUB_ENV"
|
||||
echo "RPM_VER=$rpm_ver" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Fedora - install Orca build dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
./build_linux.sh -u
|
||||
|
||||
- name: Fedora - build Orca dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
./build_linux.sh -drlL
|
||||
|
||||
- name: Fedora - build + install
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf build install-dir out
|
||||
mkdir -p out
|
||||
|
||||
cmake -S . -B build -G "Ninja Multi-Config" \
|
||||
-DCMAKE_PREFIX_PATH="${PWD}/deps/build/OrcaSlicer_dep/usr/local" \
|
||||
-DSLIC3R_STATIC=1 \
|
||||
-DSLIC3R_GTK=3 \
|
||||
-DBBL_RELEASE_TO_PUBLIC=1 \
|
||||
-DBBL_INTERNAL_TESTING=0 \
|
||||
-DSLIC3R_PCH=ON \
|
||||
-DORCA_TOOLS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="${PWD}/install-dir"
|
||||
|
||||
cmake --build build --config Release --target install -j"$(nproc)"
|
||||
|
||||
./scripts/run_gettext.sh
|
||||
mkdir -p install-dir/resources/i18n
|
||||
cp -a resources/i18n/. install-dir/resources/i18n/
|
||||
|
||||
app_bin=""
|
||||
for candidate in \
|
||||
"install-dir/bin/OrcaSlicer" \
|
||||
"install-dir/bin/orca-slicer" \
|
||||
"install-dir/OrcaSlicer" \
|
||||
"install-dir/orca-slicer"; do
|
||||
if [ -x "$candidate" ]; then
|
||||
app_bin="${candidate#install-dir/}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$app_bin" ]; then
|
||||
echo "ERROR: installed OrcaSlicer binary not found"
|
||||
find install-dir -maxdepth 3 -type f | sort
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "APP_BIN=$app_bin" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Fedora - build RPM
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf rpm
|
||||
mkdir -p rpm/BUILD rpm/BUILDROOT rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS
|
||||
cp -a install-dir rpm/SOURCES/orcaslicer-root
|
||||
|
||||
cat > rpm/SPECS/orcaslicer-bmcu.spec <<SPEC
|
||||
%global debug_package %{nil}
|
||||
Name: orcaslicer-bmcu
|
||||
Version: ${RPM_VER}
|
||||
Release: 1%{?dist}
|
||||
Summary: OrcaSlicer BMCU build
|
||||
License: AGPL-3.0
|
||||
URL: https://github.com/OrcaSlicer/OrcaSlicer
|
||||
BuildArch: x86_64
|
||||
|
||||
%description
|
||||
OrcaSlicer BMCU build installed in /opt/orcaslicer.
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}/opt/orcaslicer %{buildroot}/usr/bin
|
||||
cp -a %{_topdir}/SOURCES/orcaslicer-root/. %{buildroot}/opt/orcaslicer/
|
||||
cat > %{buildroot}/usr/bin/orca-slicer-bmcu <<'WRAPPER'
|
||||
#!/bin/sh
|
||||
exec /opt/orcaslicer/${APP_BIN} "$@"
|
||||
WRAPPER
|
||||
chmod 0755 %{buildroot}/usr/bin/orca-slicer-bmcu
|
||||
|
||||
%files
|
||||
/opt/orcaslicer
|
||||
/usr/bin/orca-slicer-bmcu
|
||||
|
||||
%changelog
|
||||
* Wed Apr 22 2026 PJARCZAK CI <ci@invalid> - ${RPM_VER}-1
|
||||
- Automated build
|
||||
SPEC
|
||||
|
||||
rpmbuild --define "_topdir ${PWD}/rpm" -bb rpm/SPECS/orcaslicer-bmcu.spec
|
||||
cp rpm/RPMS/x86_64/*.rpm "out/OrcaSlicer-BMCU_${DIST_ID}_x86_64_${VER}.rpm"
|
||||
|
||||
- name: Fedora - checksums
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd out && sha256sum * > "SHA256SUMS_${DIST_ID}.txt")
|
||||
|
||||
- name: Upload artifacts (RPM Fedora)
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: orcaslicer-bmcu-rpm-${{ env.DIST_ID }}-${{ github.sha }}
|
||||
path: out/
|
||||
if-no-files-found: error
|
||||
237
.github/workflows/build_windows_bridge.yml
vendored
Normal file
237
.github/workflows/build_windows_bridge.yml
vendored
Normal file
@@ -0,0 +1,237 @@
|
||||
name: Build Windows with Linux bridge runtime
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
prepare_linux_bridge_runtime:
|
||||
name: Prepare Linux bridge runtime
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Apt-Install Dependencies
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
- name: Build Linux deps
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for attempt in 1 2 3; do
|
||||
echo "Build Linux deps attempt $attempt"
|
||||
if ./build_linux.sh -drlL; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$attempt" -lt 3 ]; then
|
||||
echo "Transient dependency download/build failure, retrying after backoff"
|
||||
sleep $((attempt * 20))
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
|
||||
- name: Configure linux bridge host build
|
||||
shell: bash
|
||||
run: |
|
||||
cmake -S . -B build -G "Ninja Multi-Config" -DORCA_TOOLS=ON
|
||||
|
||||
- name: Build linux host runtime and WSL rootfs
|
||||
shell: bash
|
||||
run: |
|
||||
cmake --build build --config Release --target pjarczak_bambu_linux_host
|
||||
bash tools/pjarczak_bambu_linux_host/package_linux_host_runtime.sh build
|
||||
bash tools/pjarczak_bambu_runtime/rootfs/build_windows_wsl_rootfs.sh tools/pjarczak_bambu_runtime/rootfs/windows-wsl2-rootfs.tar
|
||||
tar -czvf linux_host_runtime_${{ github.sha }}.tar.gz -C tools/pjarczak_bambu_linux_host/runtime linux-x86_64
|
||||
tar -czvf wsl_rootfs_${{ github.sha }}.tar.gz -C tools/pjarczak_bambu_runtime/rootfs windows-wsl2-rootfs.tar
|
||||
|
||||
- name: Show packaged linux bridge runtime files
|
||||
shell: bash
|
||||
run: |
|
||||
find tools/pjarczak_bambu_linux_host/runtime/linux-x86_64 -maxdepth 1 -type f | sort
|
||||
|
||||
|
||||
- name: Upload linux host runtime artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: linux_host_runtime_${{ github.sha }}
|
||||
path: ./linux_host_runtime_${{ github.sha }}.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload WSL rootfs artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: wsl_rootfs_${{ github.sha }}
|
||||
path: ./wsl_rootfs_${{ github.sha }}.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
build_windows:
|
||||
name: Build Windows
|
||||
runs-on: windows-latest
|
||||
needs: prepare_linux_bridge_runtime
|
||||
env:
|
||||
ORCA_UPDATER_SIG_KEY: ${{ secrets.ORCA_UPDATER_SIG_KEY }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
lfs: 'false'
|
||||
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~4.3.0"
|
||||
useLocalCache: true
|
||||
useCloudCache: true
|
||||
|
||||
- name: Get the version and date on Windows
|
||||
shell: pwsh
|
||||
run: |
|
||||
$date = Get-Date -Format 'yyyyMMdd'
|
||||
$eventName = "${{ github.event_name }}"
|
||||
$prNumber = "${{ github.event.number }}"
|
||||
|
||||
if ($eventName -eq 'pull_request') {
|
||||
$ver = "PR" + $prNumber
|
||||
} else {
|
||||
$versionContent = Get-Content version.inc -Raw
|
||||
if ($versionContent -match 'set\(SoftFever_VERSION "(.*?)"\)') {
|
||||
$ver = $matches[1]
|
||||
}
|
||||
$ver = "V$ver"
|
||||
}
|
||||
|
||||
echo "ver=$ver" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||
echo "date=$date" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
||||
|
||||
- name: Download linux host runtime artifact
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: linux_host_runtime_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/linux_host_runtime_artifact
|
||||
|
||||
- name: Extract linux host runtime artifact on Windows
|
||||
working-directory: ${{ github.workspace }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force -Path "$env:GITHUB_WORKSPACE\tools\pjarczak_bambu_linux_host\runtime" | Out-Null
|
||||
tar -xzf "$env:GITHUB_WORKSPACE\linux_host_runtime_artifact\linux_host_runtime_${{ github.sha }}.tar.gz" -C "$env:GITHUB_WORKSPACE\tools\pjarczak_bambu_linux_host\runtime"
|
||||
|
||||
- name: Download WSL rootfs artifact
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: wsl_rootfs_${{ github.sha }}
|
||||
path: ${{ github.workspace }}/wsl_rootfs_artifact
|
||||
|
||||
- name: Extract WSL rootfs artifact on Windows
|
||||
working-directory: ${{ github.workspace }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force -Path "$env:GITHUB_WORKSPACE\tools\pjarczak_bambu_runtime\rootfs" | Out-Null
|
||||
tar -xzf "$env:GITHUB_WORKSPACE\wsl_rootfs_artifact\wsl_rootfs_${{ github.sha }}.tar.gz" -C "$env:GITHUB_WORKSPACE\tools\pjarczak_bambu_runtime\rootfs"
|
||||
|
||||
- name: setup MSVC
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Install nsis
|
||||
shell: pwsh
|
||||
run: |
|
||||
choco install nsis -y
|
||||
|
||||
- name: Build Windows deps
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\'
|
||||
WindowsSDKVersion: '10.0.26100.0\'
|
||||
shell: pwsh
|
||||
run: .\build_release_vs.bat deps
|
||||
|
||||
- name: Build slicer Win
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\'
|
||||
WindowsSDKVersion: '10.0.26100.0\'
|
||||
shell: pwsh
|
||||
run: .\build_release_vs.bat slicer
|
||||
|
||||
|
||||
- name: Ensure WSL is available for runtime validation
|
||||
shell: pwsh
|
||||
run: |
|
||||
$wsl = Join-Path $env:WINDIR 'System32\wsl.exe'
|
||||
if (!(Test-Path $wsl)) { throw 'wsl.exe not found' }
|
||||
|
||||
$ready = $false
|
||||
try {
|
||||
& $wsl --status
|
||||
if ($LASTEXITCODE -eq 0) { $ready = $true }
|
||||
} catch {}
|
||||
|
||||
if (-not $ready) {
|
||||
& $wsl --install --no-distribution
|
||||
if ($LASTEXITCODE -ne 0) { throw 'wsl --install --no-distribution failed' }
|
||||
}
|
||||
|
||||
& $wsl --update
|
||||
if ($LASTEXITCODE -ne 0) { throw 'wsl --update failed' }
|
||||
|
||||
& $wsl --status
|
||||
if ($LASTEXITCODE -ne 0) { throw 'WSL is still not ready after install/update' }
|
||||
|
||||
- name: Show packaged Orca runtime files
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-ChildItem -Force "$env:GITHUB_WORKSPACE\build\OrcaSlicer" | Format-Table Name, Length -AutoSize
|
||||
|
||||
- name: Install bundled WSL2 Orca runtime into live plugins dir
|
||||
shell: pwsh
|
||||
run: |
|
||||
& "$env:GITHUB_WORKSPACE\build\OrcaSlicer\install_runtime.ps1" -ReplaceExisting
|
||||
|
||||
- name: Show live Orca plugin dir after installer
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-ChildItem -Force "$env:APPDATA\OrcaSlicer\plugins" | Format-Table Name, Length -AutoSize
|
||||
Write-Host "--- cache dir ---"
|
||||
if (Test-Path "$env:APPDATA\OrcaSlicer\ota\plugins") {
|
||||
Get-ChildItem -Force "$env:APPDATA\OrcaSlicer\ota\plugins" | Format-Table Name, Length -AutoSize
|
||||
}
|
||||
|
||||
- name: Validate live Orca plugin dir bootstrap package
|
||||
shell: pwsh
|
||||
run: |
|
||||
& "$env:APPDATA\OrcaSlicer\plugins\verify_runtime.ps1" -PackageDir "$env:APPDATA\OrcaSlicer\plugins" -PluginCacheDir "$env:APPDATA\OrcaSlicer\ota\plugins" -AllowMissingLinuxPlugin
|
||||
|
||||
- name: Create installer Win
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
shell: pwsh
|
||||
run: |
|
||||
cpack -G NSIS
|
||||
|
||||
- name: Pack app
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
shell: cmd
|
||||
run: '"C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_Windows_${{ env.ver }}_portable.zip ${{ github.workspace }}/build/OrcaSlicer'
|
||||
|
||||
- name: Upload artifacts Win portable
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Windows_${{ env.ver }}_portable
|
||||
path: ${{ github.workspace }}/build/OrcaSlicer_Windows_${{ env.ver }}_portable.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifacts Win installer
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Windows_${{ env.ver }}_installer
|
||||
path: ${{ github.workspace }}/build/OrcaSlicer*.exe
|
||||
if-no-files-found: error
|
||||
44
.github/workflows/check_locale.yml
vendored
Normal file
44
.github/workflows/check_locale.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Check locale
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'localization/**'
|
||||
- ".github/workflows/check_locale.yml"
|
||||
|
||||
jobs:
|
||||
check_translation:
|
||||
name: Check translation
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install gettext
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gettext
|
||||
|
||||
# don't call ./run_gentext.sh as most translators never sync with main branch...
|
||||
- name: Check translation format
|
||||
run: |
|
||||
echo $PWD
|
||||
pot_file="./localization/i18n/OrcaSlicer.pot"
|
||||
for dir in ./localization/i18n/*/
|
||||
do
|
||||
dir=${dir%*/} # remove the trailing "/"
|
||||
lang=${dir##*/} # extract the language identifier
|
||||
|
||||
if [ -f "$dir/OrcaSlicer_${lang}.po" ]; then
|
||||
mkdir -p ./resources/i18n/${lang}/
|
||||
msgfmt --check-format -o ./resources/i18n/${lang}/OrcaSlicer.mo $dir/OrcaSlicer_${lang}.po
|
||||
# Check the exit status of the msgfmt command
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error encountered with msgfmt command for language ${lang}."
|
||||
exit 1 # Exit the script with an error status
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
118
.github/workflows/check_profiles.yml
vendored
Normal file
118
.github/workflows/check_profiles.yml
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
name: Check profiles
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'resources/profiles/**'
|
||||
- ".github/workflows/check_profiles.yml"
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
logLevel:
|
||||
description: 'Log level'
|
||||
required: true
|
||||
default: 'warning'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
|
||||
jobs:
|
||||
check_profiles:
|
||||
name: Check profiles
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Run extra JSON check
|
||||
id: extra_json_check
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set +e
|
||||
python3 ./scripts/orca_extra_profile_check.py 2>&1 | tee ${{ runner.temp }}/extra_json_check.log
|
||||
exit ${PIPESTATUS[0]}
|
||||
|
||||
# download
|
||||
- name: Download
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
curl -LJO https://github.com/SoftFever/Orca_tools/releases/download/1/OrcaSlicer_profile_validator
|
||||
chmod +x ./OrcaSlicer_profile_validator
|
||||
|
||||
# validate profiles
|
||||
- name: validate system profiles
|
||||
id: validate_system
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set +e
|
||||
./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -l 2 2>&1 | tee ${{ runner.temp }}/validate_system.log
|
||||
exit ${PIPESTATUS[0]}
|
||||
|
||||
- name: validate custom presets
|
||||
id: validate_custom
|
||||
continue-on-error: true
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
set +e
|
||||
curl -LJO https://github.com/OrcaSlicer/OrcaSlicer/releases/download/nightly-builds/orca_custom_preset_tests.zip
|
||||
unzip -q ./orca_custom_preset_tests.zip -d ${{ github.workspace }}/resources/profiles
|
||||
./OrcaSlicer_profile_validator -p ${{ github.workspace }}/resources/profiles -l 2 2>&1 | tee ${{ runner.temp }}/validate_custom.log
|
||||
exit ${PIPESTATUS[0]}
|
||||
|
||||
- name: Prepare comment artifact
|
||||
if: ${{ always() && github.event_name == 'pull_request' && (steps.extra_json_check.outcome == 'failure' || steps.validate_system.outcome == 'failure' || steps.validate_custom.outcome == 'failure') }}
|
||||
run: |
|
||||
mkdir -p ${{ runner.temp }}/profile-check-results
|
||||
|
||||
{
|
||||
echo "## :x: Profile Validation Errors"
|
||||
echo ""
|
||||
|
||||
if [ "${{ steps.extra_json_check.outcome }}" = "failure" ]; then
|
||||
echo "### Extra JSON Check Failed"
|
||||
echo ""
|
||||
echo '```'
|
||||
head -c 30000 ${{ runner.temp }}/extra_json_check.log || echo "No output captured"
|
||||
echo '```'
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [ "${{ steps.validate_system.outcome }}" = "failure" ]; then
|
||||
echo "### System Profile Validation Failed"
|
||||
echo ""
|
||||
echo '```'
|
||||
head -c 30000 ${{ runner.temp }}/validate_system.log || echo "No output captured"
|
||||
echo '```'
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [ "${{ steps.validate_custom.outcome }}" = "failure" ]; then
|
||||
echo "### Custom Preset Validation Failed"
|
||||
echo ""
|
||||
echo '```'
|
||||
head -c 30000 ${{ runner.temp }}/validate_custom.log || echo "No output captured"
|
||||
echo '```'
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "---"
|
||||
echo "*Please fix the above errors and push a new commit.*"
|
||||
} > ${{ runner.temp }}/profile-check-results/pr_comment.md
|
||||
|
||||
echo "${{ github.event.pull_request.number }}" > ${{ runner.temp }}/profile-check-results/pr_number.txt
|
||||
|
||||
- name: Upload comment artifact
|
||||
if: ${{ always() && github.event_name == 'pull_request' && (steps.extra_json_check.outcome == 'failure' || steps.validate_system.outcome == 'failure' || steps.validate_custom.outcome == 'failure') }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: profile-check-results
|
||||
path: ${{ runner.temp }}/profile-check-results/
|
||||
retention-days: 1
|
||||
|
||||
- name: Fail if any check failed
|
||||
if: ${{ always() && (steps.extra_json_check.outcome == 'failure' || steps.validate_system.outcome == 'failure' || steps.validate_custom.outcome == 'failure') }}
|
||||
run: |
|
||||
echo "One or more profile checks failed. See above for details."
|
||||
exit 1
|
||||
46
.github/workflows/check_profiles_comment.yml
vendored
Normal file
46
.github/workflows/check_profiles_comment.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Post profile check comment
|
||||
|
||||
# NOTE: The workflow name in the 'workflows' filter below must match the 'name'
|
||||
# field in check_profiles.yml exactly. If that name changes, update it here too.
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Check profiles"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
post_comment:
|
||||
name: Post PR comment
|
||||
runs-on: ubuntu-24.04
|
||||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
- name: Download artifact
|
||||
id: download
|
||||
uses: actions/download-artifact@v8
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: profile-check-results
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
- name: Post comment on PR
|
||||
if: ${{ steps.download.outcome == 'success' }}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
run: |
|
||||
if [ ! -f pr_number.txt ] || [ ! -f pr_comment.md ]; then
|
||||
echo "No comment artifact found, skipping."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PR_NUMBER=$(cat pr_number.txt)
|
||||
if ! [[ "$PR_NUMBER" =~ ^[0-9]+$ ]]; then
|
||||
echo "Invalid PR number: $PR_NUMBER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gh pr comment "$PR_NUMBER" --body-file pr_comment.md
|
||||
81
.github/workflows/dedupe-issues.yml
vendored
Normal file
81
.github/workflows/dedupe-issues.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
name: Orca Issue Dedupe
|
||||
description: Automatically dedupe GitHub issues using AI
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
issue_number:
|
||||
description: 'Issue number to process for duplicate detection'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
dedupe-issues:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Run Claude Code slash command
|
||||
uses: anthropics/claude-code-base-action@beta
|
||||
with:
|
||||
prompt: "/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number || inputs.issue_number }}"
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
claude_args: "--model claude-sonnet-4-5-20250929"
|
||||
claude_env: |
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log duplicate comment event to Statsig
|
||||
if: always()
|
||||
env:
|
||||
STATSIG_API_KEY: ${{ secrets.STATSIG_API_KEY }}
|
||||
run: |
|
||||
ISSUE_NUMBER=${{ github.event.issue.number || inputs.issue_number }}
|
||||
REPO=${{ github.repository }}
|
||||
|
||||
if [ -z "$STATSIG_API_KEY" ]; then
|
||||
echo "STATSIG_API_KEY not found, skipping Statsig logging"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Prepare the event payload
|
||||
EVENT_PAYLOAD=$(jq -n \
|
||||
--arg issue_number "$ISSUE_NUMBER" \
|
||||
--arg repo "$REPO" \
|
||||
--arg triggered_by "${{ github.event_name }}" \
|
||||
'{
|
||||
events: [{
|
||||
eventName: "github_duplicate_comment_added",
|
||||
value: 1,
|
||||
metadata: {
|
||||
repository: $repo,
|
||||
issue_number: ($issue_number | tonumber),
|
||||
triggered_by: $triggered_by,
|
||||
workflow_run_id: "${{ github.run_id }}"
|
||||
},
|
||||
time: (now | floor | tostring)
|
||||
}]
|
||||
}')
|
||||
|
||||
# Send to Statsig API
|
||||
echo "Logging duplicate comment event to Statsig for issue #${ISSUE_NUMBER}"
|
||||
|
||||
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://events.statsigapi.net/v1/log_event \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "STATSIG-API-KEY: ${STATSIG_API_KEY}" \
|
||||
-d "$EVENT_PAYLOAD")
|
||||
|
||||
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
|
||||
BODY=$(echo "$RESPONSE" | head -n-1)
|
||||
|
||||
if [ "$HTTP_CODE" -eq 200 ] || [ "$HTTP_CODE" -eq 202 ]; then
|
||||
echo "Successfully logged duplicate comment event for issue #${ISSUE_NUMBER}"
|
||||
else
|
||||
echo "Failed to log duplicate comment event for issue #${ISSUE_NUMBER}. HTTP ${HTTP_CODE}: ${BODY}"
|
||||
fi
|
||||
78
.github/workflows/doxygen-docs.yml
vendored
Normal file
78
.github/workflows/doxygen-docs.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
name: Generate Doxygen Documentation
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * 1' # Every Monday at midnight UTC
|
||||
workflow_dispatch: # Manual trigger
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
name: Build and Deploy Docs
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
# Only run on main branch of the main repository
|
||||
if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main'
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: thejerrybao/setup-swap-space@v1
|
||||
with:
|
||||
swap-space-path: /swapfile
|
||||
swap-size-gb: 8
|
||||
remove-existing-swap-files: true
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Doxygen and Graphviz
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y doxygen graphviz
|
||||
|
||||
- name: Generate documentation
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# Override DOT_NUM_THREADS to avoid parallel dot race condition bug
|
||||
sed -i 's/^DOT_NUM_THREADS.*/DOT_NUM_THREADS = 1/' .doxygen
|
||||
doxygen .doxygen
|
||||
# Verify documentation was generated
|
||||
if [ ! -f "internal_docs/index.html" ]; then
|
||||
echo "Error: Documentation generation failed - index.html not found"
|
||||
exit 1
|
||||
fi
|
||||
- name: Install Rclone
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sudo -v
|
||||
curl -fsSL https://rclone.org/install.sh | sudo bash
|
||||
|
||||
- name: optimize
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -f internal_docs/Nodes.xml internal_docs/Tokens.xml
|
||||
find internal_docs -name "*.map" -type f -delete || true
|
||||
find internal_docs -name "*.md5" -type f -delete || true
|
||||
|
||||
- name: upload
|
||||
# We configure rclone dynamically using environment variables
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# Remove existing config if it exists to avoid conflicts
|
||||
rclone config delete cloudflare 2>/dev/null || true
|
||||
rclone config create cloudflare s3 \
|
||||
provider Cloudflare \
|
||||
access_key_id ${{ secrets.R2_ACCESS_KEY_ID }} \
|
||||
secret_access_key ${{ secrets.R2_SECRET_ACCESS_KEY }} \
|
||||
endpoint ${{ secrets.R2_ENDPOINT }}
|
||||
|
||||
rclone sync internal_docs/ cloudflare:orcaslicer-internals \
|
||||
--progress \
|
||||
--transfers 512 \
|
||||
--checkers 512
|
||||
|
||||
echo "Documentation upload completed successfully"
|
||||
84
.github/workflows/my_build_all.yml
vendored
Normal file
84
.github/workflows/my_build_all.yml
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
name: My Build All
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: my-build-all-${{ github.event.release.tag_name || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_windows:
|
||||
uses: ./.github/workflows/build_windows_bridge.yml
|
||||
secrets: inherit
|
||||
|
||||
build_linux_portable:
|
||||
uses: ./.github/workflows/build_linux_portable.yml
|
||||
secrets: inherit
|
||||
|
||||
build_linux_appimage:
|
||||
uses: ./.github/workflows/build_linux_appimage.yml
|
||||
secrets: inherit
|
||||
|
||||
build_macos:
|
||||
uses: ./.github/workflows/build_macos_bridge.yml
|
||||
secrets: inherit
|
||||
|
||||
publish_release:
|
||||
name: Publish release assets
|
||||
needs:
|
||||
- build_windows
|
||||
- build_linux_portable
|
||||
- build_linux_appimage
|
||||
- build_macos
|
||||
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
path: release-artifacts
|
||||
|
||||
- name: Flatten release files
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p release-files
|
||||
find release-artifacts -type f -print0 | while IFS= read -r -d '' file; do
|
||||
cp "$file" release-files/"$(basename "$file")"
|
||||
done
|
||||
ls -lah release-files
|
||||
|
||||
- name: Resolve tag
|
||||
shell: bash
|
||||
env:
|
||||
EVENT_TAG: ${{ github.event.release.tag_name }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="${EVENT_TAG:-${GITHUB_REF_NAME:-}}"
|
||||
if [[ -z "$tag" ]]; then
|
||||
echo "ERROR: tag could not be resolved"
|
||||
exit 1
|
||||
fi
|
||||
echo "RELEASE_TAG=$tag" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Create or update GitHub release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ env.RELEASE_TAG }}
|
||||
generate_release_notes: true
|
||||
overwrite_files: true
|
||||
files: |
|
||||
release-files/*
|
||||
44
.github/workflows/shellcheck.yml
vendored
Normal file
44
.github/workflows/shellcheck.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.sh'
|
||||
- 'scripts/linux.d/*'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.sh'
|
||||
- 'scripts/linux.d/*'
|
||||
schedule:
|
||||
- cron: '55 7 * * *' # run once a day near midnight US Pacific time
|
||||
workflow_dispatch: # allows for manual dispatch
|
||||
|
||||
name: "Shellcheck"
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
shellcheck:
|
||||
name: Shellcheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cache shellcheck download
|
||||
id: cache-shellcheck-v0_11
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/shellcheck
|
||||
key: ${{ runner.os }}-shellcheck-v0_11
|
||||
|
||||
- name: Download shellcheck
|
||||
if: steps.cache-shellcheck-v0_11.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
env:
|
||||
INPUT_VERSION: "v0.11.0"
|
||||
run: |
|
||||
curl -L#o ~/sc.tar.xz "https://github.com/koalaman/shellcheck/releases/download/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.linux.x86_64.tar.xz"
|
||||
tar -xvf ~/sc.tar.xz -C ~
|
||||
mv ~/shellcheck-"${INPUT_VERSION}"/shellcheck ~/shellcheck
|
||||
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Shellcheck scripts
|
||||
run: 'find . -not -name \*.md \( -path ./scripts/linux.d/\* -o -name \*.sh \) -print0 | xargs -0 ~/shellcheck'
|
||||
38
.github/workflows/update-translation.yml
vendored
Normal file
38
.github/workflows/update-translation.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Update Translation Catalog
|
||||
on:
|
||||
# schedule:
|
||||
# - cron: 0 0 * * 1
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update_translation:
|
||||
name: Update translation
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install gettext
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gettext
|
||||
|
||||
- name: Update translation catalog
|
||||
run: |
|
||||
./scripts/run_gettext.sh --full
|
||||
git add localization/i18n/*
|
||||
|
||||
- name: Commit translation catalog updates
|
||||
uses: qoomon/actions--create-commit@v1
|
||||
id: commit
|
||||
with:
|
||||
message: Update translation catalog
|
||||
skip-empty: true
|
||||
|
||||
- name: Push changes
|
||||
run: git push
|
||||
14
.github/workflows/winget_updater.yml
vendored
Normal file
14
.github/workflows/winget_updater.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: Publish to WinGet
|
||||
on:
|
||||
release:
|
||||
types: [ released ]
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: vedantmgoyal9/winget-releaser@main
|
||||
with:
|
||||
identifier: SoftFever.OrcaSlicer
|
||||
version: ${{ github.event.release.tag_name }}
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
installers-regex: '\.exe$'
|
||||
Reference in New Issue
Block a user