Based on rust:slim-bookworm image with tpoechtrager/osxcross build to MacOS cross comilation.
682
This is a gitlab CI stage which use this image:
build_macos:
stage: build_macos
image: poka/rust-osxcross:1.0.2
script:
# Install the required dependencies
- rustup target add x86_64-apple-darwin
# Build the project for macOS
- cargo build --release --target x86_64-apple-darwin
# Create the macOS bundle
- rm -rf target/macos
- mkdir -p target/macos
- cargo bundle --release --target x86_64-apple-darwin
# Zip the gcli.app before moving it
- cd target/x86_64-apple-darwin/release/bundle/osx
- echo -e "Unzip gcli.zip and move the gcli.app folder to /Applications/ folder.\nenjoy" > instructions.txt
- zip -r gcli.zip gcli.app instructions.txt
- mv gcli.zip ../../../../macos/ # target/macos/
artifacts:
paths:
- target/macos
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- target/macos
only:
- tags
Content type
Image
Digest
sha256:88e80589d…
Size
643 MB
Last updated
11 months ago
docker pull poka/rust-osxcross