Skip to content

Example repo to demonstrate how to cross-compile from Linux to Mac using Github Actions.

Notifications You must be signed in to change notification settings

hwrdtm/rust-linux-cross-mac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What

In order to download the build artifacts, you will need to create a fine-grained personal access token on Github. Read how here.

Once you have a PAT, you can list the artifacts with the following command:

curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR_GITHUB_PAT>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/repos/OWNER/REPO/actions/artifacts

You can download the artifact using the archive_download_url from the previous command in the following command:

curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR_GITHUB_PAT>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  <archive_download_url> --output target/debug/build_d73e35faf4a73e206c31c0a3ee799aa398ba370e.zip

After downloading, be sure to grant execution permissions to the executable before running it:

chmod +x target/debug/build_d73e35faf4a73e206c31c0a3ee799aa398ba370e.zip

About

Example repo to demonstrate how to cross-compile from Linux to Mac using Github Actions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages