Upgrade Mac CI/CD to macos-14 (#5856)
This commit is contained in:
parent
63dcf82f15
commit
7e85eb0d7d
5 changed files with 24 additions and 18 deletions
4
.github/workflows/build_all.yml
vendored
4
.github/workflows/build_all.yml
vendored
|
@ -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:
|
||||
|
|
8
.github/workflows/build_check_cache.yml
vendored
8
.github/workflows/build_check_cache.yml
vendored
|
@ -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
|
||||
|
|
9
.github/workflows/build_deps.yml
vendored
9
.github/workflows/build_deps.yml
vendored
|
@ -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 }}
|
||||
|
|
17
.github/workflows/build_orca.yml
vendored
17
.github/workflows/build_orca.yml
vendored
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
;;
|
||||
* )
|
||||
|
|
Loading…
Reference in a new issue