forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding yamato script to crossbuild apple silicon support.
Trying my shiny new mac image with latest OS and xcode
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{% metadata_file .yamato/Globals.metafile %} | ||
--- | ||
name: Build OSX ARM64 | ||
|
||
agent: | ||
type: Unity::VM::osx | ||
image: platform-foundation/mac-10.15-bokken:latest | ||
flavor: m1.mac | ||
|
||
variables: | ||
ARTIFACT_FILENAME: {{globals.artifact_base_name}}-osx-arm64.7z | ||
|
||
commands: | ||
- mkdir artifacts | ||
- curl https://public-stevedore.unity3d.com/r/public/7za-mac-x64/e6c75fb7ffda_5bd76652986a0e3756d1cfd7e84ce056a9e1dbfc5f70f0514a001f724c0fbad2.zip --output artifacts/7za-mac-x64.zip | ||
- unzip artifacts/7za-mac-x64.zip -d artifacts/7za-mac-x64 | ||
- | | ||
cd unity/unitygc | ||
mkdir release | ||
cd release | ||
cmake -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_BUILD_TYPE=Release .. | ||
cmake --build . | ||
- LD_LIBRARY_PATH=/usr/local/opt/openssl/lib ./build.sh -subset clr+libs -a arm64 -c release -cross -ci -ninja /p:CrossBuild=true | ||
- cp unity/unitygc/release/libunitygc.dylib artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Release/runtimes/osx-arm64/native | ||
- artifacts/7za-mac-x64/7za a artifacts/unity/$ARTIFACT_FILENAME ./artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Release/runtimes/osx-arm64 | ||
|
||
artifacts: | ||
osx-arm64-7z: | ||
paths: | ||
- artifacts/unity/** | ||
osx-arm64: | ||
paths: | ||
- artifacts/bin/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{% metadata_file .yamato/Globals.metafile %} | ||
--- | ||
name: Test OSX ARM64 | ||
|
||
agent: | ||
type: Unity::VM::osx | ||
image: platform-foundation/mac-bokken:v0.1.8-972754 | ||
flavor: m1.mac | ||
|
||
dependencies: | ||
- path: .yamato/build_osx_arm64.yml | ||
|
||
commands: | ||
# build/run tests | ||
- dotnet build unity/managed.sln -c Release | ||
- | | ||
cd unity/embed_api_tests | ||
cmake -DCMAKE_BUILD_TYPE=Release . | ||
cmake --build . | ||
./mono_test_app | ||
- LD_LIBRARY_PATH=/usr/local/opt/openssl/lib ./build.sh -subset libs.tests -test -a arm64 -c release -ci -ninja | ||
- ./src/tests/build.sh arm64 release ci | ||
- ./src/tests/run.sh arm64 release | ||
- ./build.sh clr.paltests | ||
- ./artifacts/bin/coreclr/OSX.arm64.Debug/paltests/runpaltests.sh $(pwd)/artifacts/bin/coreclr/OSX.arm64.Debug/paltests | ||
|
||
triggers: | ||
pull_requests: | ||
- targets: | ||
only: | ||
- "unity-main" |