Skip to content

Commit

Permalink
Update macos action to correct arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwason committed Jul 27, 2024
1 parent 6610308 commit 38324ef
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,17 @@ env:
jobs:
build-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
config:
- runner: macos-12
vcpkg_triplet: x64-osx-dynamic-release
arch: x64
- runner: macos-14
vcpkg_triplet: arm64-osx-dynamic-release
arch: arm64
runs-on: ${{ matrix.config.runner }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -52,10 +62,10 @@ jobs:
with:
pkgs: >-
${{ env.VCPKG_PKGS }}
triplet: x64-osx-dynamic-release
triplet: ${{ matrix.config.vcpkg_triplet }}
extra-args: --clean-after-build --overlay-triplets=${{ github.workspace }}/ws/src/tesseract/.github/workflows/vcpkg_triplets
token: ${{ github.token }}
cache-key: osx-x64-vcpkg
cache-key: osx-${{ matrix.config.arch }}-vcpkg
revision: master
github-binarycache: true
- name: pip3
Expand All @@ -67,8 +77,8 @@ jobs:
- name: colcon build
working-directory: ws
run: |
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release/lib
export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/vcpkg/installed/${{ matrix.config.vcpkg_triplet }}/lib
export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/vcpkg/installed/${{ matrix.config.vcpkg_triplet }}
colcon build --merge-install \
--packages-ignore tesseract_examples trajopt_ifopt trajopt_sqp ifopt vhacd tesseract_python \
Expand All @@ -87,8 +97,8 @@ jobs:
- name: colcon test
working-directory: ws
run: |
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release/lib
export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/vcpkg/installed/${{ matrix.config.vcpkg_triplet }}/lib
export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/vcpkg/installed/${{ matrix.config.vcpkg_triplet }}
colcon test --merge-install \
--packages-ignore tesseract_examples trajopt_ifopt trajopt_sqp ifopt vhacd tesseract_python \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)

set(VCPKG_BUILD_TYPE release)
set(VCPKG_OSX_DEPLOYMENT_TARGET 14.0)

0 comments on commit 38324ef

Please sign in to comment.