mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-10 10:47:16 +00:00
Compare commits
3 Commits
nightly-bu
...
hanif/ci-c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9fe8893eb | ||
|
|
7de6c7499f | ||
|
|
be1c128a19 |
79
.github/workflows/build_orca.yml
vendored
79
.github/workflows/build_orca.yml
vendored
@@ -76,6 +76,56 @@ jobs:
|
|||||||
if (-not (Test-Path "$cmakeBin\cmake.exe")) { throw "cmake.exe not found at $cmakeBin" }
|
if (-not (Test-Path "$cmakeBin\cmake.exe")) { throw "cmake.exe not found at $cmakeBin" }
|
||||||
Add-Content -Path $env:GITHUB_PATH -Value $cmakeBin
|
Add-Content -Path $env:GITHUB_PATH -Value $cmakeBin
|
||||||
|
|
||||||
|
# Compiler cache. Pushes save it, so main keeps it warm; pull requests
|
||||||
|
# restore it and discard what they compiled. Objects are keyed on the
|
||||||
|
# preprocessed source, the compiler and the flags, so a leg only ever
|
||||||
|
# hits its own entries. A failed install costs the caching, not the build.
|
||||||
|
- name: Name the compiler cache leg
|
||||||
|
if: ${{ !inputs.macos-combine-only }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
leg="${{ runner.os }}-${{ inputs.arch || 'amd64' }}${{ runner.os == 'Windows' && format('-{0}', inputs.compiler) || '' }}"
|
||||||
|
echo "CCACHE_LEG=$leg" >> "$GITHUB_ENV"
|
||||||
|
echo "CCACHE_ENTRY=ccache-$leg-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
# The action only installs and configures ccache. Restore and save go
|
||||||
|
# through actions/cache with one path string, since the cache service
|
||||||
|
# only matches entries saved under the identical path and the action
|
||||||
|
# spells it differently on Windows.
|
||||||
|
- name: Compiler cache
|
||||||
|
id: ccache
|
||||||
|
if: ${{ !inputs.macos-combine-only }}
|
||||||
|
continue-on-error: true
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
|
with:
|
||||||
|
key: ${{ env.CCACHE_LEG }}
|
||||||
|
max-size: 3G
|
||||||
|
restore: false
|
||||||
|
save: false
|
||||||
|
|
||||||
|
- name: Restore compiler cache
|
||||||
|
if: ${{ steps.ccache.outcome == 'success' }}
|
||||||
|
uses: actions/cache/restore@v6
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/.ccache
|
||||||
|
key: ${{ env.CCACHE_ENTRY }}
|
||||||
|
restore-keys: ccache-${{ env.CCACHE_LEG }}-
|
||||||
|
|
||||||
|
- name: Enable compiler cache
|
||||||
|
if: ${{ steps.ccache.outcome == 'success' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "CMAKE_C_COMPILER_LAUNCHER=ccache" >> "$GITHUB_ENV"
|
||||||
|
echo "CMAKE_CXX_COMPILER_LAUNCHER=ccache" >> "$GITHUB_ENV"
|
||||||
|
# Headers a fresh checkout has just written, and the few files that
|
||||||
|
# use __DATE__ or __TIME__.
|
||||||
|
echo "CCACHE_SLOPPINESS=time_macros,include_file_mtime,include_file_ctime" >> "$GITHUB_ENV"
|
||||||
|
# Clang rebuilds the precompiled header with a fresh timestamp on
|
||||||
|
# every run, so everything that includes it would miss.
|
||||||
|
echo "ORCA_EXTRA_BUILD_ARGS=-DSLIC3R_PCH=OFF" >> "$GITHUB_ENV"
|
||||||
|
# The restored directory carries the previous run's counters.
|
||||||
|
ccache -z
|
||||||
|
|
||||||
- name: Get the version and date on Ubuntu and macOS
|
- name: Get the version and date on Ubuntu and macOS
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
run: |
|
run: |
|
||||||
@@ -670,3 +720,32 @@ jobs:
|
|||||||
asset_name: orca_custom_preset_tests.zip
|
asset_name: orca_custom_preset_tests.zip
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
max_releases: 1
|
max_releases: 1
|
||||||
|
|
||||||
|
- name: Compiler cache statistics
|
||||||
|
if: ${{ always() && steps.ccache.outcome == 'success' }}
|
||||||
|
shell: bash
|
||||||
|
run: ccache -s -v || ccache -s
|
||||||
|
|
||||||
|
# Entries are immutable, so the new one is saved first and the older
|
||||||
|
# ones for this leg on this ref are dropped afterwards: a failed save
|
||||||
|
# leaves the previous entry in place.
|
||||||
|
- name: Save compiler cache
|
||||||
|
id: ccache_save
|
||||||
|
if: ${{ steps.ccache.outcome == 'success' && github.event_name != 'pull_request' }}
|
||||||
|
uses: actions/cache/save@v6
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/.ccache
|
||||||
|
key: ${{ env.CCACHE_ENTRY }}
|
||||||
|
|
||||||
|
- name: Drop older compiler cache entries
|
||||||
|
if: ${{ steps.ccache_save.outcome == 'success' }}
|
||||||
|
# A read-only token (fork PRs) cannot delete; that only costs storage.
|
||||||
|
continue-on-error: true
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
gh cache list --ref "$GITHUB_REF" --key "ccache-$CCACHE_LEG-" --limit 100 --json id,key \
|
||||||
|
| jq -r --arg keep "$CCACHE_ENTRY" '.[] | select(.key != $keep) | .id' \
|
||||||
|
| tr -d '\r' \
|
||||||
|
| while read -r id; do gh cache delete "$id"; done
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ function build_slicer() {
|
|||||||
mkdir -p "$PROJECT_BUILD_DIR"
|
mkdir -p "$PROJECT_BUILD_DIR"
|
||||||
cd "$PROJECT_BUILD_DIR"
|
cd "$PROJECT_BUILD_DIR"
|
||||||
if [ "1." != "$BUILD_ONLY". ]; then
|
if [ "1." != "$BUILD_ONLY". ]; then
|
||||||
|
read -r -a EXTRA_BUILD_ARGS <<< "${ORCA_EXTRA_BUILD_ARGS:-}"
|
||||||
cmake "${PROJECT_DIR}" \
|
cmake "${PROJECT_DIR}" \
|
||||||
-G "${SLICER_CMAKE_GENERATOR}" \
|
-G "${SLICER_CMAKE_GENERATOR}" \
|
||||||
-DORCA_TOOLS=ON \
|
-DORCA_TOOLS=ON \
|
||||||
@@ -264,7 +265,8 @@ function build_slicer() {
|
|||||||
-DCMAKE_OSX_ARCHITECTURES="${_ARCH}" \
|
-DCMAKE_OSX_ARCHITECTURES="${_ARCH}" \
|
||||||
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" \
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" \
|
||||||
-DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" \
|
-DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" \
|
||||||
${CMAKE_POLICY_COMPAT}
|
${CMAKE_POLICY_COMPAT} \
|
||||||
|
"${EXTRA_BUILD_ARGS[@]}"
|
||||||
fi
|
fi
|
||||||
cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET"
|
cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -164,10 +164,10 @@ cd %build_dir%
|
|||||||
echo on
|
echo on
|
||||||
set CMAKE_POLICY_VERSION_MINIMUM=3.5
|
set CMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||||
if "%USE_NINJA%"=="1" (
|
if "%USE_NINJA%"=="1" (
|
||||||
cmake .. -G %CMAKE_GENERATOR% %CLANG_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type%
|
cmake .. -G %CMAKE_GENERATOR% %CLANG_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% %ORCA_EXTRA_BUILD_ARGS%
|
||||||
cmake --build . --config %build_type% --target all
|
cmake --build . --config %build_type% --target all
|
||||||
) else (
|
) else (
|
||||||
cmake .. -G %CMAKE_GENERATOR% -A %arch% %TOOLSET_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type%
|
cmake .. -G %CMAKE_GENERATOR% -A %arch% %TOOLSET_ARG% -DORCA_TOOLS=ON %SIG_FLAG% -DBUILD_TESTS=%BUILD_TESTS% -DCMAKE_BUILD_TYPE=%build_type% %ORCA_EXTRA_BUILD_ARGS%
|
||||||
cmake --build . --config %build_type% --target ALL_BUILD -- -m
|
cmake --build . --config %build_type% --target ALL_BUILD -- -m
|
||||||
)
|
)
|
||||||
@echo off
|
@echo off
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <charconv>
|
#include <charconv>
|
||||||
#endif
|
#endif
|
||||||
|
#include <iomanip>
|
||||||
|
#include <sstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include <fast_float/fast_float.h>
|
#include <fast_float/fast_float.h>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "MainFrame.hpp"
|
#include "MainFrame.hpp"
|
||||||
#include "format.hpp"
|
#include "format.hpp"
|
||||||
#include "Widgets/ProgressDialog.hpp"
|
#include "Widgets/ProgressDialog.hpp"
|
||||||
|
#include <wx/tooltip.h>
|
||||||
#include "Widgets/RoundedRectangle.hpp"
|
#include "Widgets/RoundedRectangle.hpp"
|
||||||
#include "Widgets/StaticBox.hpp"
|
#include "Widgets/StaticBox.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include <boost/regex.hpp>
|
#include <boost/regex.hpp>
|
||||||
|
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/tooltip.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user