Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace lipo command line with fat-macho crate #405

Merged
merged 3 commits into from
Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
profile: minimal
toolchain: stable
override: true
- name: Install aarch64-apple-darwin Rust target
if: matrix.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin
#- name: Cache cargo registry
# uses: actions/cache@v2
# with:
Expand All @@ -51,6 +54,16 @@ jobs:
# with:
# path: target
# key: ${{ runner.os }}-${{ steps.rustup.outputs.rustc_hash }}-target-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Xcode env
if: matrix.os == 'macos-latest'
shell: bash
run: |
echo "PYO3_CROSS_LIB_DIR=/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib" >> "${GITHUB_ENV}"
sudo xcode-select -s /Applications/Xcode_12.3.app
bindir="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/bin"
echo "CC=${bindir}/clang" >> "${GITHUB_ENV}"
echo "CXX=${bindir}/clang++" >> "${GITHUB_ENV}"
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "${GITHUB_ENV}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xcode 12.2 and later can compile to both x86_64 and arm64 targets on Intel & Apple Silicon platforms. I am not sure why xcode-select alone does not work, had to setup CC, CXX etc.

- name: cargo test
uses: actions-rs/cargo@v1
with:
Expand Down
Loading