Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
upgrade to macos 13 (SoftFever#3289)
Browse files Browse the repository at this point in the history
brew uninstall --ignore-dependencies zstd
Use local curl
remove brew/macport dependency
  • Loading branch information
SoftFever committed Dec 26, 2023
1 parent 38b22fc commit 2436988
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
include:
- os: ubuntu-20.04
- os: windows-latest
- os: macos-12
- os: macos-13
arch: x86_64
- os: macos-12
- os: macos-13
arch: arm64
uses: ./.github/workflows/build_check_cache.yml
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_check_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ 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-13' && '_' || ''}}${{ inputs.os == 'macos-13' && inputs.arch || '' }} # if is macos, make a string that does "_{arch}", else output nothing
dash-arch: ${{ inputs.os == 'macos-13' && '-' || ''}}${{ inputs.os == 'macos-13' && inputs.arch || '' }} # if is macos, make a string that does "-{arch}", else output nothing
dep-folder-name: ${{ (inputs.os == 'windows-latest' || inputs.os == 'macos-13') && '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 }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ jobs:
cd ${{ github.workspace }}/deps/build
- name: Build on Mac ${{ inputs.arch }}
if: inputs.os == 'macos-12'
if: inputs.os == 'macos-13'
working-directory: ${{ github.workspace }}
run: |
brew install cmake git gettext automake
brew uninstall --ignore-dependencies zstd
brew list
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep_${{ inputs.arch }}
Expand All @@ -97,7 +98,7 @@ jobs:

# Upload Artifacts
- name: Upload Mac ${{ inputs.arch }} artifacts
if: inputs.os == 'macos-12'
if: inputs.os == 'macos-13'
uses: actions/upload-artifact@v3
with:
name: OrcaSlicer_dep_mac_${{ inputs.arch }}_${{ env.date }}
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/build_orca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,24 @@ jobs:

# Mac
- name: Install tools mac
if: inputs.os == 'macos-12'
if: inputs.os == 'macos-13'
run: |
brew install cmake git gettext zstd tree
brew install cmake git gettext tree
brew uninstall --ignore-dependencies zstd
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-13'
working-directory: ${{ github.workspace }}
run: |
./build_release_macos.sh -s -n -a ${{inputs.arch}}
# 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-13'
working-directory: ${{ github.workspace }}
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
Expand All @@ -114,14 +117,14 @@ 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-13'
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-13'
uses: actions/upload-artifact@v3
with:
name: OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}
Expand Down
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -436,11 +436,8 @@ find_package(TBB REQUIRED)
# add_definitions(-DTBB_USE_CAPTURED_EXCEPTION=0)

find_package(OpenSSL REQUIRED)
if (APPLE)
find_package(CURL CONFIG REQUIRED)
else()
find_package(CURL REQUIRED)
endif()


add_library(libcurl INTERFACE)
target_link_libraries(libcurl INTERFACE CURL::libcurl)
Expand Down
25 changes: 13 additions & 12 deletions build_release_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@ fi
echo "Arch: $ARCH"
echo "BUILD_TARGET: $BUILD_TARGET"

if which -s brew; then
brew --prefix libiconv
brew --prefix zstd
export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix zstd)/lib/
elif which -s port; then
port install libiconv
port install zstd
export LIBRARY_PATH=$LIBRARY_PATH:/opt/local/lib
else
echo "Need either brew or macports to successfully build deps"
exit 1
fi
# if which -s brew; then
# brew --prefix libiconv
# brew --prefix zstd
# export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix zstd)/lib/
# elif which -s port; then
# port install libiconv
# port install zstd
# export LIBRARY_PATH=$LIBRARY_PATH:/opt/local/lib
# else
# echo "Need either brew or macports to successfully build deps"
# exit 1
# fi


WD="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd $WD/deps
Expand Down

0 comments on commit 2436988

Please sign in to comment.