Skip to content

Commit

Permalink
cleanup workflow, try to fix libomp related issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sitic committed Mar 23, 2024
1 parent 343ae6e commit b9d8241
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ jobs:
# Common prefix will be used so that ccache can be used across commits.
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-ccache
# New Apple linker causes build issues, use old linker for now
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
if: ${{ matrix.os == 'macos-14' }}
with:
xcode-version: '14.3.1'
- name: Set up Python version
uses: actions/setup-python@v4
Expand All @@ -71,20 +64,28 @@ jobs:
- name: Install dependencies
run: |
brew install ccache pkg-config
brew reinstall gcc # gfortran is otherwise not found
# Install libomp 11.1.0 from old brew bottle for catalina (10.15).
# Directly installing the Ruby formula will install for the current OS
# https://github.com/microsoft/LightGBM/issues/4229
if [[ ${{ runner.arch}} == "X64" ]]; then
brew unlink libomp
# x64 catalina (10.15) bottle
export LIBOMP_BOTTLE_HASH=45a5aa653bd45bd5ff5858580b1a4670c4b5a51ea29d68d45a53f72f56010e05
fi
if [[ ${{ runner.arch}} == "ARM64" ]]; then
# fix gfortran not found issue
brew relink gcc
# brew unlink libomp
# catalina (10.15) bottle
# export LIBOMP_BOTTLE_HASH=45a5aa653bd45bd5ff5858580b1a4670c4b5a51ea29d68d45a53f72f56010e05
# the new Xcode 15 'ld-prime' linker causes build issues, use old linker for now
export LDFLAGS="$LDFLAGS -Wl,-ld_classic"
# arm64_big_sur bottle
export LIBOMP_BOTTLE_HASH=f87f7841eb8b72650fa771af39642361aec371ea1a1f94f081ecc0e8168a0e75
# arm64 big_sur (11.0) bottle
export LIBOMP_BOTTLE_HASH=f87f7841eb8b72650fa771af39642361aec371ea1a1f94f081ecc0e8168a0e75
fi
curl -L -H "Authorization: Bearer QQ==" -o libomp-11.1.0.bottle.tar.gz \
https://ghcr.io/v2/homebrew/core/libomp/blobs/sha256:$LIBOMP_BOTTLE_HASH
brew install -f libomp-11.1.0.bottle.tar.gz
ccache -M 2G # See .github/workflows/readme.md for ccache strategy.
- name: Config and build
run: |
Expand All @@ -107,7 +108,7 @@ jobs:
if: ${{ env.BUILD_SHARED_LIBS == 'ON' }}
uses: actions/upload-artifact@v3
with:
name: open3d-devel-macosx
name: open3d-devel-macosx-${{ runner.arch }}
path: build/package/${{ env.DEVEL_PKG_NAME }}
if-no-files-found: error

Expand Down Expand Up @@ -189,12 +190,6 @@ jobs:
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-ccache
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
if: ${{ matrix.os == 'macos-14' }}
with:
xcode-version: '14.3.1'

- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -217,7 +212,12 @@ jobs:
export LIBOMP_BOTTLE_HASH=45a5aa653bd45bd5ff5858580b1a4670c4b5a51ea29d68d45a53f72f56010e05
fi
if [[ ${{ runner.arch}} == "ARM64" ]]; then
brew reinstall gcc # gfortran is otherwise not found
# fix gfortran not found issue
brew relink gcc
# the new Xcode 15 'ld-prime' linker causes build issues, use old linker for now
export LDFLAGS="$LDFLAGS -Wl,-ld_classic"
# arm64 big_sur (11.0) bottle
export LIBOMP_BOTTLE_HASH=f87f7841eb8b72650fa771af39642361aec371ea1a1f94f081ecc0e8168a0e75
fi
Expand Down

0 comments on commit b9d8241

Please sign in to comment.