Skip to content

Github Action for setting up osxcross in a github action for cross compiling from Linux to Mac

License

Notifications You must be signed in to change notification settings

8Mi-Tech/setup-osx-cross

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup osxcross

Github Action for setting up osxcross in a github action.

This version is forked from the original with the following changes:

  • ARM support.
  • Updated actions/cache to v4 to avoid Gitlab CI warning and deprecation.

Sources & Shoutouts

Usage

# Setup Rust, use the x86_64-apple-darwin target but the rest can be customized.
- uses: ATiltedTree/setup-rust@v1
  with:
    targets: x86_64-apple-darwin
    rust-version: nightly

# Use the v1 of this action
- uses: mbround18/setup-osxcross@v1
  # This builds executables & sets env variables for rust to consume.
  with:
    osx-version: "12.3"

# Checkout your code
- name: Clone your Code
  uses: actions/checkout@v3

# Build your code for apple-darwin based release
- name: Build Your Code
  run: cargo build --release --target x86_64-apple-darwin

ZLIB and C/++ compilations

If you run into issues were you have zlib or have c as a dependenacy consider setting the following in your env.

# Make libz-sys (git2-rs -> libgit2-sys -> libz-sys) build as a statically linked lib
# This prevents the host zlib from being linked
export LIBZ_SYS_STATIC=1

# Use Clang for C/C++ builds
export CC=o64-clang
export CXX=o64-clang++

About

Github Action for setting up osxcross in a github action for cross compiling from Linux to Mac

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published