diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 1736e8d78d8..c0e8ca12665 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -49,9 +49,9 @@ jobs: include: - os: ubuntu-20.04 - os: windows-latest - - os: macos-12 + - os: macos-14 arch: x86_64 - - os: macos-12 + - os: macos-14 arch: arm64 uses: ./.github/workflows/build_check_cache.yml with: diff --git a/.github/workflows/build_check_cache.yml b/.github/workflows/build_check_cache.yml index b0ff506fa86..f71cc9b2817 100644 --- a/.github/workflows/build_check_cache.yml +++ b/.github/workflows/build_check_cache.yml @@ -30,12 +30,12 @@ jobs: - name: set outputs id: set_outputs env: - underscore-arch: ${{ inputs.os == 'macos-12' && '_' || ''}}${{ inputs.os == 'macos-12' && inputs.arch || '' }} # if is macos, make a string that does "_{arch}", else output nothing - dash-arch: ${{ inputs.os == 'macos-12' && '-' || ''}}${{ inputs.os == 'macos-12' && inputs.arch || '' }} # if is macos, make a string that does "-{arch}", else output nothing - dep-folder-name: ${{ (inputs.os == 'windows-latest' || inputs.os == 'macos-12') && 'OrcaSlicer_dep' || 'destdir' }} + underscore-arch: ${{ inputs.os == 'macos-14' && '_' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "_{arch}", else output nothing + dash-arch: ${{ inputs.os == 'macos-14' && '-' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "-{arch}", else output nothing + dep-folder-name: ${{ (inputs.os == 'windows-latest' || inputs.os == 'macos-14') && 'OrcaSlicer_dep' || 'destdir' }} output-cmd: ${{ inputs.os == 'windows-latest' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}} run: | - echo cache-key=${{ runner.os }}${{ env.dash-arch }}-cache-orcaslicer_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }} + echo cache-key=${{ inputs.os }}${{ env.dash-arch }}-cache-orcaslicer_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }} echo cache-path=${{ github.workspace }}/deps/build${{ env.underscore-arch }}/${{ env.dep-folder-name }}${{ env.underscore-arch }} >> ${{ env.output-cmd }} - name: load cache diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index bd6d7f215ba..3dc26aa51a8 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -69,15 +69,16 @@ jobs: cd ${{ github.workspace }}/deps/build - name: Build on Mac ${{ inputs.arch }} - if: inputs.os == 'macos-12' + if: inputs.os == 'macos-14' working-directory: ${{ github.workspace }} run: | - brew install cmake git gettext automake texinfo ninja + brew install cmake + brew install automake texinfo ninja libtool brew list mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }} mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep_${{ inputs.arch }} brew uninstall --ignore-dependencies zstd - ./build_release_macos.sh -dpx -a ${{ inputs.arch }} -t 10.15 + ./build_release_macos.sh -dpx -a ${{ inputs.arch }} -t 10.15 -1 brew install zstd @@ -102,7 +103,7 @@ jobs: # Upload Artifacts - name: Upload Mac ${{ inputs.arch }} artifacts - if: inputs.os == 'macos-12' + if: inputs.os == 'macos-14' uses: actions/upload-artifact@v4 with: name: OrcaSlicer_dep_mac_${{ inputs.arch }}_${{ env.date }} diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index 835db630f12..727046687ee 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -75,23 +75,24 @@ jobs: # Mac - name: Install tools mac - if: inputs.os == 'macos-12' + if: inputs.os == 'macos-14' run: | - brew install cmake git gettext tree ninja + brew install cmake + brew install tree ninja libtool brew list mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}} mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}/OrcaSlicer_dep_${{inputs.arch}} tree ${{ github.workspace }}/deps/build_${{inputs.arch}}/OrcaSlicer_dep_${{inputs.arch}} - name: Build slicer mac - if: inputs.os == 'macos-12' + if: inputs.os == 'macos-14' working-directory: ${{ github.workspace }} run: | - ./build_release_macos.sh -s -n -x -a ${{inputs.arch}} -t 10.15 + ./build_release_macos.sh -s -n -x -a ${{inputs.arch}} -t 10.15 -1 # Thanks to RaySajuuk, it's working now - name: Sign app and notary - if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && inputs.os == 'macos-12' + if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && inputs.os == 'macos-14' working-directory: ${{ github.workspace }} env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} @@ -117,21 +118,21 @@ jobs: xcrun stapler staple OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg - name: Create DMG without notary - if: github.ref != 'refs/heads/main' && inputs.os == 'macos-12' + if: github.ref != 'refs/heads/main' && inputs.os == 'macos-14' working-directory: ${{ github.workspace }} run: | ln -s /Applications ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer/Applications hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg - name: Upload artifacts mac - if: inputs.os == 'macos-12' + if: inputs.os == 'macos-14' uses: actions/upload-artifact@v4 with: name: OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }} path: ${{ github.workspace }}/OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg - name: Deploy Mac release - if: github.ref == 'refs/heads/main' && inputs.os == 'macos-12' + if: github.ref == 'refs/heads/main' && inputs.os == 'macos-14' uses: WebFreak001/deploy-nightly@v3.1.0 with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} diff --git a/build_release_macos.sh b/build_release_macos.sh index 5da682d3f85..38a360ed2d7 100755 --- a/build_release_macos.sh +++ b/build_release_macos.sh @@ -34,6 +34,9 @@ while getopts ":dpa:snt:xbc:h" opt; do c ) export BUILD_CONFIG="$OPTARG" ;; + 1 ) + export CMAKE_BUILD_PARALLEL_LEVEL=1 + ;; h ) echo "Usage: ./build_release_macos.sh [-d]" echo " -d: Build deps only" echo " -a: Set ARCHITECTURE (arm64 or x86_64)" @@ -43,6 +46,7 @@ while getopts ":dpa:snt:xbc:h" opt; do echo " -x: Use Ninja CMake generator, default is Xcode" echo " -b: Build without reconfiguring CMake" echo " -c: Set CMake build configuration, default is Release" + echo " -1: Use single job for building" exit 0 ;; * )