mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 18:27:00 +00:00
Compare commits
4 Commits
nightly-bu
...
hanif/ci-c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b1f1863d5 | ||
|
|
4fabfb9237 | ||
|
|
77f60efba8 | ||
|
|
86f73c889b |
36
.github/workflows/build_orca.yml
vendored
36
.github/workflows/build_orca.yml
vendored
@@ -76,6 +76,37 @@ 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. Objects are keyed on the preprocessed source, the
|
||||||
|
# compiler binary and the flags, so a leg only ever hits its own entries.
|
||||||
|
# Pushes save (main keeps the cache warm); pull requests restore it and
|
||||||
|
# discard what they compiled, so the store does not grow per PR. A failed
|
||||||
|
# install only costs the caching, not the build.
|
||||||
|
- name: Compiler cache
|
||||||
|
id: ccache
|
||||||
|
if: ${{ !inputs.macos-combine-only }}
|
||||||
|
continue-on-error: true
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}-${{ inputs.arch || 'amd64' }}${{ runner.os == 'Windows' && format('-{0}', inputs.compiler) || '' }}
|
||||||
|
max-size: 2G
|
||||||
|
# TEST: pull requests save too, so a second run on this branch measures
|
||||||
|
# a warm cache. Restore-only for pull_request before merge.
|
||||||
|
save: true
|
||||||
|
|
||||||
|
- 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"
|
||||||
|
# Needed for precompiled headers and for headers a fresh checkout
|
||||||
|
# has just written.
|
||||||
|
echo "CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime" >> "$GITHUB_ENV"
|
||||||
|
# Clang rebuilds the precompiled header with a fresh timestamp on
|
||||||
|
# every run, so every file that includes it misses the cache. All
|
||||||
|
# three build scripts forward this to the slicer configure.
|
||||||
|
echo "ORCA_EXTRA_BUILD_ARGS=-DSLIC3R_PCH=OFF" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- 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 +701,8 @@ 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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user