Update Github workflow so macos and windows builds can run separately
This commit is contained in:
16
.github/workflows/build_all.yml
vendored
16
.github/workflows/build_all.yml
vendored
@@ -13,6 +13,14 @@ on:
|
||||
description: 'Build Linux and Flatpak artifacts'
|
||||
type: boolean
|
||||
default: false
|
||||
build_windows:
|
||||
description: 'Build Windows artifacts'
|
||||
type: boolean
|
||||
default: true
|
||||
build_macos:
|
||||
description: 'Build macOS artifacts'
|
||||
type: boolean
|
||||
default: true
|
||||
build_macos_x86_64:
|
||||
description: 'Build macOS x86_64 and universal artifacts'
|
||||
type: boolean
|
||||
@@ -47,7 +55,7 @@ jobs:
|
||||
release-version: ${{ inputs.release_version || '' }}
|
||||
secrets: inherit
|
||||
build_windows:
|
||||
if: ${{ !cancelled() && (github.event_name != 'create' || (github.event.ref_type == 'branch' && startsWith(github.event.ref, 'release/'))) }}
|
||||
if: ${{ !cancelled() && (inputs.build_windows || github.event_name != 'workflow_dispatch') && (github.event_name != 'create' || (github.event.ref_type == 'branch' && startsWith(github.event.ref, 'release/'))) }}
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-win-server' || 'windows-latest' }}
|
||||
@@ -60,7 +68,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: ${{ fromJSON(((inputs.build_macos_x86_64 || false) || vars.BUILD_MACOS_X86_64 == 'true') && '["arm64","x86_64"]' || '["arm64"]') }}
|
||||
if: ${{ !cancelled() && (github.event_name != 'create' || (github.event.ref_type == 'branch' && startsWith(github.event.ref, 'release/'))) }}
|
||||
if: ${{ !cancelled() && (inputs.build_macos || github.event_name != 'workflow_dispatch') && (github.event_name != 'create' || (github.event.ref_type == 'branch' && startsWith(github.event.ref, 'release/'))) }}
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-macos-arm64' || 'macos-14' }}
|
||||
@@ -72,7 +80,7 @@ jobs:
|
||||
build_macos_universal:
|
||||
name: Build macOS Universal
|
||||
needs: build_macos_arch
|
||||
if: ${{ !cancelled() && (github.event_name != 'create' || (github.event.ref_type == 'branch' && startsWith(github.event.ref, 'release/'))) && ((inputs.build_macos_x86_64 || false) || vars.BUILD_MACOS_X86_64 == 'true') && needs.build_macos_arch.result == 'success' && !inputs.build-deps-only }}
|
||||
if: ${{ !cancelled() && (inputs.build_macos || github.event_name != 'workflow_dispatch') && (github.event_name != 'create' || (github.event.ref_type == 'branch' && startsWith(github.event.ref, 'release/'))) && ((inputs.build_macos_x86_64 || false) || vars.BUILD_MACOS_X86_64 == 'true') && 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' }}
|
||||
@@ -87,7 +95,7 @@ jobs:
|
||||
- build_windows
|
||||
- build_macos_arch
|
||||
- build_macos_universal
|
||||
if: ${{ always() && github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && (inputs.publish_release || false) && !inputs.build-deps-only && needs.build_windows.result == 'success' && needs.build_macos_arch.result == 'success' && (needs.build_macos_universal.result == 'success' || needs.build_macos_universal.result == 'skipped') }}
|
||||
if: ${{ always() && github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && (inputs.publish_release || false) && !inputs.build-deps-only && (inputs.build_windows || inputs.build_macos) && (inputs.build_windows == false || needs.build_windows.result == 'success') && (inputs.build_macos == false || needs.build_macos_arch.result == 'success') && (inputs.build_macos == false || needs.build_macos_universal.result == 'success' || needs.build_macos_universal.result == 'skipped') }}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
steps:
|
||||
|
||||
13
.github/workflows/build_orca.yml
vendored
13
.github/workflows/build_orca.yml
vendored
@@ -382,12 +382,6 @@ jobs:
|
||||
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
|
||||
@@ -402,13 +396,6 @@ jobs:
|
||||
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
|
||||
|
||||
@@ -219,8 +219,8 @@ if (MSVC)
|
||||
endif ()
|
||||
# /bigobj (Increase Number of Sections in .Obj file)
|
||||
# error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm90' or greater
|
||||
# Generate symbols at every build target, even for the release.
|
||||
add_compile_options(-bigobj -Zm520 /Zi)
|
||||
add_compile_options(-bigobj -Zm520)
|
||||
add_compile_options($<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:/Zi>)
|
||||
# Disable STL4007: Many result_type typedefs and all argument_type, first_argument_type, and second_argument_type typedefs are deprecated in C++17.
|
||||
#FIXME Remove this line after eigen library adapts to the new C++17 adaptor rules.
|
||||
add_compile_options(-D_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING)
|
||||
|
||||
@@ -114,10 +114,14 @@ REM Set minimum CMake policy to avoid <3.5 errors
|
||||
set CMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
if "%USE_NINJA%"=="1" (
|
||||
cmake ../ -G %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=%build_type%
|
||||
if errorlevel 1 exit /b 1
|
||||
cmake --build . --config %build_type% --target deps
|
||||
if errorlevel 1 exit /b 1
|
||||
) else (
|
||||
cmake ../ -G %CMAKE_GENERATOR% -A x64 -DCMAKE_BUILD_TYPE=%build_type%
|
||||
if errorlevel 1 exit /b 1
|
||||
cmake --build . --config %build_type% --target deps -- -m
|
||||
if errorlevel 1 exit /b 1
|
||||
)
|
||||
@echo off
|
||||
|
||||
@@ -136,16 +140,22 @@ if defined CMAKE_C_COMPILER_LAUNCHER set "CMAKE_LAUNCHER_FLAGS=%CMAKE_LAUNCHER_F
|
||||
if defined CMAKE_CXX_COMPILER_LAUNCHER set "CMAKE_LAUNCHER_FLAGS=%CMAKE_LAUNCHER_FLAGS% -DCMAKE_CXX_COMPILER_LAUNCHER=%CMAKE_CXX_COMPILER_LAUNCHER%"
|
||||
if "%USE_NINJA%"=="1" (
|
||||
cmake .. -G %CMAKE_GENERATOR% -DORCA_TOOLS=ON %SIG_FLAG% -DCMAKE_BUILD_TYPE=%build_type% %CMAKE_LAUNCHER_FLAGS%
|
||||
if errorlevel 1 exit /b 1
|
||||
cmake --build . --config %build_type%
|
||||
if errorlevel 1 exit /b 1
|
||||
) else (
|
||||
cmake .. -G %CMAKE_GENERATOR% -A x64 -DORCA_TOOLS=ON %SIG_FLAG% -DCMAKE_BUILD_TYPE=%build_type% %CMAKE_LAUNCHER_FLAGS%
|
||||
if errorlevel 1 exit /b 1
|
||||
cmake --build . --config %build_type% --target ALL_BUILD -- -m
|
||||
if errorlevel 1 exit /b 1
|
||||
)
|
||||
@echo off
|
||||
cd ..
|
||||
call scripts/run_gettext.bat
|
||||
if errorlevel 1 exit /b 1
|
||||
cd %build_dir%
|
||||
cmake --build . --target install --config %build_type%
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
:done
|
||||
@echo off
|
||||
|
||||
Reference in New Issue
Block a user